Memperbarui set data SQL kustom.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
quickbi-public:UpdateCubeBySql |
update |
*All Resource
|
None | None |
Sintaks permintaan
POST HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| CubeId |
string |
Yes |
ID set data. |
7c7223ae-****-3c744528014b |
| CustomSql |
string |
Yes |
Pernyataan SQL kustom. |
select * from sdsd |
| WorkspaceId |
string |
Yes |
ID ruang kerja. |
95296e95-ca89-4c7d-8af9-dedf0ad0**** |
| UserId |
string |
Yes |
ID pengguna Quick BI yang memiliki izin untuk membuat set data. Ini bukan ID akun Alibaba Cloud Anda. Anda dapat memanggil operasi QueryUserInfoByAccount untuk mendapatkan ID pengguna. |
95296e95-ca89-4c7d-8af9-dedf0ad0**** |
| DsId |
string |
Yes |
ID sumber data. |
7AAB95D-*****-****-*4FC0C976 |
| Placeholders |
string |
No |
Parameter placeholder. Untuk informasi lebih lanjut, lihat deskripsi tambahan di bawah. |
[ { "name": "test", "style": "placeholder", "type": "string" } ] |
Struktur PlaceholderModel placeholder
-
uniqueId -- string, opsional, ID unik placeholder. Anda tidak perlu menentukan parameter ini saat membuat placeholder. Meskipun ditentukan, parameter ini tidak digunakan. (Bidang ini digunakan saat pembaruan.)
-
name -- string, wajib, nama placeholder. Harus unik.
-
style -- string, wajib, tipe placeholder.
Placeholder ekspresi: param
Placeholder nilai: placeholder
Placeholder kondisi: condition
-
type -- String, tipe variabel placeholder.
Text: string
Numeric: number
Date: lihat deskripsi format di bawah.
-
useInGlobal -- Boolean, opsional, apakah placeholder berlaku secara global. Nilai default: false.
Ya: true
Tidak: false
-
defaultValue -- List
, opsional, nilai default placeholder. Untuk tipe placeholder shipping_date_ph.get(0), jumlah nilai default hanya boleh 0 atau 2. Untuk tipe placeholder lainnya, jumlah hanya boleh 0 atau 1. -
format -- String, opsional, format tipe tanggal (lihat deskripsi format di bawah).
-
originalType -- String, opsional. Jika placeholder nilai adalah tipe tanggal shipping_date_ph.get(0), atur originalType ke dateRange. Dalam semua kasus lainnya, Anda tidak perlu mengatur parameter ini.
-
conditionPlaceHolderFields -- List, opsional, bidang placeholder kondisi. Konfigurasikan parameter ini hanya untuk placeholder kondisi.
Struktur ConditionPlaceHolderFields
uniqueId -- String, opsional, ID unik bidang placeholder kondisi. Anda tidak perlu menentukan parameter ini saat membuat placeholder. Sistem menghasilkan nilai secara otomatis.
column -- String, wajib, nama bidang fisik.
Pemetaan antara style dan type untuk placeholder ekspresi
Tipe variabel ### Nilai type yang sesuai.
Text string
Numeric number
Date-Year yearRegion
Date-Year-Quarter quarterRegion
Date-Year-Month monthRegion
Date-Year-Week weekRegion
Date-Year-Month-Day dateRegion
Date-Year-Month-Day-Hour-Minute-Second ymdHmsRegion
Pemetaan antara style, type, dan format untuk placeholder nilai (kosong berarti tidak wajib)
Tipe variabel ### Nilai type yang sesuai ### format.
Text string (tidak didukung untuk tipe tanggal shipping_date_ph.get(0))
Numeric number (tidak didukung untuk tipe tanggal shipping_date_ph.get(0))
Date-Year yearRegion
Date-Year-Quarter quarterRegion
Date-Year-Month monthRegion Pilih salah satu dari tiga format berikut: YYYY-MM, YYYYMM, atau YYYY/MM.
Date-Year-Week weekRegion
Date-Year-Month-Day dateRegion Pilih salah satu dari tiga format berikut: YYYY-MM-DD, YYYYMMDD, atau YYYY/MM/DD.
Date-Year-Month-Day-Hour-Minute-Second ymdHmsRegion Pilih salah satu dari empat format berikut: YYYY-MM-DD HH:MI:SS, YYYYMMDD HH:MI:SS, YYYY/MM/DD HH:MI:SS, atau YYYYMMDDHHMISS.
Pemetaan antara style dan type untuk placeholder kondisi
Tipe variabel ### Nilai type yang sesuai.
Text string.
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
Skema Tanggapan. |
||
| RequestId |
string |
ID permintaan. |
617277******************ABA47E31 |
| Result |
boolean |
Hasil eksekusi operasi. Nilai valid:
|
true |
| Success |
boolean |
Apakah permintaan berhasil. Nilai valid:
|
true |
Contoh
Respons sukses
JSONformat
{
"RequestId": "617277******************ABA47E31",
"Result": true,
"Success": true
}
Kode kesalahan
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | |
| 400 | Invalid.User.Organization | The user is not in your organization. | |
| 400 | User.NotIn.Workspace | The user is not a member of the group workspace. | |
| 400 | Workspace.NotIn.Organization | The workspace is not owned by the organization. | |
| 400 | Datasource.NotFound.Error | The specified data source does not exist: %s. | |
| 400 | Invalid.Param.Error | The parameter is invalid. | |
| 400 | Cube.Not.Exist | The Cube does not exist. | |
| 400 | CubeSchema.Not.Exist | The cube schema does not exist. | |
| 400 | Cube.DuplicatedName.Error | The dataset name already exists. Modify the name before saving. | |
| 400 | Directory.NotExist.Error | The directory does not exist. | |
| 400 | Xengnie.TaskExecute.Error | Fail to execute task %s. | |
| 400 | Datasource.Sql.ExecuteFailed | Failed to execute the SQL statement in the data source. | |
| 400 | Placeholder.Date.Illegal | The placeholder date format is illegal. | |
| 400 | Placeholder.DefaultValue.Invalid | Invalid placeholder default value. | |
| 400 | Placeholder.Style.Illegal | Illegal placeholder style. | |
| 400 | Placeholder.Type.Illegal | Illegal placeholder type. | |
| 400 | Placeholder.UniqueId.Duplicate | Sql placeholder uniqueId duplicate. | |
| 400 | PlaceholderName.Duplicate.Error | Sql placeholder name duplicate. | |
| 400 | PlaceholderName.NotMatch.Error | The parsing and input placeholder names do not match. | |
| 400 | Placeholder.FieldNot.Empty | Condition placeHolder field not empty. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.