Updates the metadata information about a table.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | UpdateMetaTable | The operation that you want to perform. Set the value to UpdateMetaTable. |
ProjectId | Long | Yes | 101 | The ID of the DataWorks workspace. |
TableName | String | Yes | table1 | The name of the table. |
EnvType | Integer | Yes | 1 | The environment of the DataWorks workspace. Valid values: 0 and 1. The value 0 indicates the development environment. The value 1 indicates the production environment. |
TableGuid | String | No | odps.test.table1 | The globally unique identifier (GUID) of the table. Specify the GUID in the format of odps.{projectName}.{tableName}. |
NewOwnerId | String | No | 12345 | The ID of the new owner. If this parameter is not specified, the owner ID is not updated. |
AddedLabels | String | No | a,b,c | The names of the labels that you want to add. Separate the labels with commas (,). |
RemovedLabels | String | No | a,b,c | The names of labels that you want to delete. Separate the labels with commas (,). |
CategoryId | Long | No | 101 | The ID of the category that you want to associate. |
Visibility | Integer | No | 1 | The scope in which the table is visible. Valid values: 0, 1, and 2. The value 0 indicates that the table is invisible to all workspace members. The value 1 indicates that the table is visible to all workspace members. The value 2 indicates that the table is visible to workspace members. |
Caption | String | No | Display name | The display name of the table. |
Schema | String | No | default | The schema information of the table. You need to configure this parameter if you enable the table schema in MaxCompute. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
UpdateResult | Boolean | true | Indicates whether the metadata information about the table is updated. |
RequestId | String | abcde | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=UpdateMetaTable
&ProjectId=101
&TableName=table1
&EnvType=1
&TableGuid=odps.test.table1
&NewOwnerId=12345
&AddedLabels=a,b,c
&RemovedLabels=a,b,c
&CategoryId=101
&Visibility=1
&Caption=Display name
&Schema=default
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<UpdateMetaTableResponse>
<UpdateResult>true</UpdateResult>
<RequestId>abcde</RequestId>
</UpdateMetaTableResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"UpdateResult" : true,
"RequestId" : "abcde"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
429 | Throttling.Api | The request for this resource has exceeded your available limit. | The error message returned because the number of requests for the resource has exceeded the upper limit. |
429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | The error message returned because the number of requests per day for the resource has exceeded the upper limit. |
429 | Throttling.System | The DataWorks system is busy. Try again later. | The error message returned because the DataWorks system is busy. Try again later. |
429 | Throttling.User | Your request is too frequent. Try again later. | The error message returned because excessive requests have been submitted within a short period of time. Try again later. |
500 | InternalError.System | An internal system error occurred. Try again later. | The error message returned because an internal error has occurred. Try again later. |
500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | The error message returned because an internal error has occurred. Try again later. |
For a list of error codes, see Service error codes.