Updates a custom SQL dataset.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
quickbi-public:UpdateCubeBySql |
update |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CubeId |
string |
Yes |
The dataset ID. |
7c7223ae-****-3c744528014b |
| CustomSql |
string |
Yes |
The custom SQL statement. |
select * from sdsd |
| WorkspaceId |
string |
Yes |
The workspace ID. |
95296e95-ca89-4c7d-8af9-dedf0ad0**** |
| UserId |
string |
Yes |
The user ID of a Quick BI user who has permissions to create datasets. This is not your Alibaba Cloud account ID. You can call the QueryUserInfoByAccount operation to obtain the user ID. |
95296e95-ca89-4c7d-8af9-dedf0ad0**** |
| DsId |
string |
Yes |
The data source ID. |
7AAB95D-*****-****-*4FC0C976 |
| Placeholders |
string |
No |
The placeholder parameters. For more information, see the supplementary description below. |
[ { "name": "test", "style": "placeholder", "type": "string" } ] |
Placeholder PlaceholderModel structure
-
uniqueId -- string, optional, the unique ID of the placeholder. You do not need to specify this parameter when creating a placeholder. Even if specified, it is not used. (This field is used during updates.)
-
name -- string, required, the placeholder name. Must be unique.
-
style -- string, required, the placeholder type.
Expression placeholder: param
Value placeholder: placeholder
Condition placeholder: condition
-
type -- String, the placeholder variable type.
Text: string
Numeric: number
Date: see the format description below.
-
useInGlobal -- Boolean, optional, specifies whether the placeholder takes effect globally. Default value: false.
Yes: true
No: false
-
defaultValue -- List
, optional, the default value of the placeholder. For shipping_date_ph.get(0) placeholder types, the number of default values can only be 0 or 2. For other placeholder types, the number can only be 0 or 1. -
format -- String, optional, the date type format (see the format description below).
-
originalType -- String, optional. If the value placeholder is a date type of shipping_date_ph.get(0), set originalType to dateRange. In all other cases, you do not need to set this parameter.
-
conditionPlaceHolderFields -- List, optional, the condition placeholder fields. Configure this parameter only for condition placeholders.
ConditionPlaceHolderFields structure
uniqueId -- String, optional, the unique ID of the condition placeholder field. You do not need to specify this parameter when creating a placeholder. The system generates a value automatically.
column -- String, required, the physical field name.
Mapping between style and type for expression placeholders
Variable type ### Corresponding type value.
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
Mapping between style, type, and format for value placeholders (blank means not required)
Variable type ### Corresponding type value ### format.
Text string (not supported for shipping_date_ph.get(0) date types)
Numeric number (not supported for shipping_date_ph.get(0) date types)
Date-Year yearRegion
Date-Year-Quarter quarterRegion
Date-Year-Month monthRegion Choose one of the following three formats: YYYY-MM, YYYYMM, or YYYY/MM.
Date-Year-Week weekRegion
Date-Year-Month-Day dateRegion Choose one of the following three formats: YYYY-MM-DD, YYYYMMDD, or YYYY/MM/DD.
Date-Year-Month-Day-Hour-Minute-Second ymdHmsRegion Choose one of the following four formats: YYYY-MM-DD HH:MI:SS, YYYYMMDD HH:MI:SS, YYYY/MM/DD HH:MI:SS, or YYYYMMDDHHMISS.
Mapping between style and type for condition placeholders
Variable type ### Corresponding type value.
Text string.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
617277******************ABA47E31 |
| Result |
boolean |
The execution result of the operation. Valid values:
|
true |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"RequestId": "617277******************ABA47E31",
"Result": true,
"Success": true
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Internal.System.Error | An internal system error occurred. | An internal system error occurred. |
| 400 | Invalid.User.Organization | The user is not in your organization. | The user is not in your organization. |
| 400 | User.NotIn.Workspace | The user is not a member of the group workspace. | The user is not a member of the group workspace. |
| 400 | Workspace.NotIn.Organization | The workspace is not owned by the organization. | The workspace is not owned by the organization. |
| 400 | Datasource.NotFound.Error | The specified data source does not exist: %s. | The specified data source does not exist: %s. |
| 400 | Invalid.Param.Error | The parameter is invalid. | The parameter is invalid. |
| 400 | Cube.Not.Exist | The Cube does not exist. | The Cube does not exist. |
| 400 | CubeSchema.Not.Exist | The cube schema does not exist. | cube schema do not exists. |
| 400 | Cube.DuplicatedName.Error | The dataset name already exists. Modify the name before saving. | The dataset name already exists. Modify the name before saving. |
| 400 | Directory.NotExist.Error | The directory does not exist. | The directory does not exist. |
| 400 | Xengnie.TaskExecute.Error | Fail to execute task %s. | 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. | The placeholder date format is illegal. |
| 400 | Placeholder.DefaultValue.Invalid | Invalid placeholder default value. | Invalid placeholder default value. |
| 400 | Placeholder.Style.Illegal | Illegal placeholder style. | Illegal placeholder style. |
| 400 | Placeholder.Type.Illegal | Illegal placeholder type. | Illegal placeholder type. |
| 400 | Placeholder.UniqueId.Duplicate | Sql placeholder uniqueId duplicate. | Sql placeholder uniqueId duplicate. |
| 400 | PlaceholderName.Duplicate.Error | Sql placeholder name duplicate. | Sql placeholder name duplicate. |
| 400 | PlaceholderName.NotMatch.Error | The parsing and input placeholder names do not match. | The parsing and input placeholder names do not match |
| 400 | Placeholder.FieldNot.Empty | Condition placeHolder field not empty. | Condition placeHolder field not empty. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.