UpdateCubeBySql
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 Quick BI user ID of a 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" } ] |
PlaceholderModel structure
-
uniqueId -- string, optional. The unique ID of the placeholder. You do not need to specify this parameter when creating a placeholder. If specified, it is ignored. This field is used during updates.
-
name -- string, required. The name of the placeholder. The name must be unique.
-
style -- string, required. The placeholder type. Valid values:
param: expression placeholder
placeholder: value placeholder
condition: condition placeholder
-
type -- String. The placeholder variable type. Valid values:
string: text
number: numeric value
Date: see the format description below
-
useInGlobal -- Boolean, optional. Specifies whether the placeholder takes effect globally. Default value: false. Valid values:
true: Yes.
false: No.
-
defaultValue -- List
, optional. The default value of the placeholder. For the shipping_date_ph.get(0) placeholder type, 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 section below.
-
originalType -- String, optional. If the value placeholder is of the shipping_date_ph.get(0) date type, set originalType to dateRange. In other cases, you do not need to specify this parameter.
-
conditionPlaceHolderFields -- List, optional. The condition placeholder fields. This parameter is required 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 field. The system automatically generates it.
column -- String, required. The name of the physical field.
Mappings between style and type for expression placeholders
Variable type ### Corresponding type.
Text string
Number 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
Mappings among style, type, and format for value placeholders (blank indicates that the field is not required)
Variable type ### Corresponding type ### format.
Text string (not supported for the shipping_date_ph.get(0) date type)
Number number (not supported for the shipping_date_ph.get(0) date type)
Date-Year yearRegion
Date-Year-Quarter quarterRegion
Date-Year-Month monthRegion YYYY-MM, YYYYMM, or YYYY/MM. Select one of the three formats.
Date-Year-Week weekRegion
Date-Year-Month-Day dateRegion YYYY-MM-DD, YYYYMMDD, or YYYY/MM/DD. Select one of the three formats.
Date-Year-Month-Day-Hour-Minute-Second ymdHmsRegion YYYY-MM-DD HH:MI:SS, YYYYMMDD HH:MI:SS, YYYY/MM/DD HH:MI:SS, or YYYYMMDDHHMISS. Select one of the four formats.
Mappings between style and type for condition placeholders
Variable type ### Corresponding type.
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 is 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. | Failed to execute SQL on 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.