UpdateTable
Updates a MaxCompute table.
This API has been deprecated with no replacement. While temporary access is maintained, no further updates or bug fixes will be provided. To ensure continued functionality, plan your migration and contact your account manager for support.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
IsView
deprecated
|
integer |
No |
Specifies whether the table is a view. Valid values: 0 (no) and 1 (yes). [Deprecated] Do not use this field. |
0 |
| Visibility |
integer |
No |
The visibility of the table. Valid values: 0 (invisible to all members), 1 (visible to all members), and 2 (visible to workspace members). |
1 |
| LifeCycle |
integer |
No |
The lifecycle of the table. Unit: days. If this parameter is left empty, the table is permanently stored. |
10 |
| CategoryId |
integer |
No |
The ID of the associated category. |
101 |
| LogicalLevelId |
integer |
No |
The logical level ID. |
101 |
| PhysicsLevelId |
integer |
No |
The physical level ID. |
101 |
ExternalTableType
deprecated
|
string |
No |
The type of the external table. Valid values: 0 (OSS), 1 (Tablestore), 2 (Volume), and 3 (MySQL). [Deprecated] Do not use this field. |
1 |
Location
deprecated
|
string |
No |
The storage address of the external table. [Deprecated] Do not use this field. |
location |
| ProjectId |
integer |
No |
The ID of the DataWorks workspace. You can log on to the DataWorks console to obtain the workspace ID. |
101 |
| TableName |
string |
Yes |
The name of the MaxCompute table. |
abc |
| Endpoint |
string |
No |
The MaxCompute endpoint. If you do not specify this parameter, the endpoint of the project is used by default. |
odps:// |
| EnvType |
integer |
No |
The environment of the DataWorks workspace. Valid values: 0 (development environment) and 1 (production environment). |
1 |
| AppGuid |
string |
No |
The unique identifier of the MaxCompute project. Format: odps.{projectName}. |
odps.test |
CreateIfNotExists
deprecated
|
boolean |
No |
Specifies whether the table exists. Valid values:
[Deprecated] Do not use this field. |
true |
HasPart
deprecated
|
integer |
No |
Specifies whether the MaxCompute table to be updated is a partitioned table. Valid values: 0 (no) and 1 (yes). [Deprecated] Do not use this field. The system determines whether the MaxCompute table is a partitioned table based on the Column.N.isPartitionCol parameter. If the Column.N.isPartition parameter is set to 1, the MaxCompute table is considered a partitioned table. |
0 |
| Comment |
string |
No |
The comment. |
Comment |
| Schema |
string |
No |
The schema information of the table. In MaxCompute, you must specify the schema information when the three-level model is enabled. |
default |
| Columns |
array<object> |
No |
The list of columns. |
|
|
object |
No |
The column. |
||
| ColumnNameCn |
string |
No |
The Chinese name of the column. |
Chinese |
| ColumnName |
string |
Yes |
The name of the column. |
abc |
| Comment |
string |
No |
The comment of the column. |
Comment |
| ColumnType |
string |
Yes |
The data type of the column. For more information, see the data types supported by MaxCompute. |
string |
| SeqNumber |
integer |
No |
The sequence number of the column. If the column is a partition column, you cannot configure Columns.N.SeqNumber. |
1 |
| Length |
integer |
No |
The length of the column. |
10 |
| IsPartitionCol |
boolean |
No |
Specifies whether the column is a partition column. Valid values: 0 (no) and 1 (yes). |
0 |
| Themes |
array<object> |
No |
The list of columns. |
|
|
object |
No |
The column. |
||
| ThemeId |
integer |
No |
The ID of the associated theme. |
101 |
| ThemeLevel |
integer |
No |
The level corresponding to the theme ID. |
101 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned object. |
||
| RequestId |
string |
The request ID. |
abcde |
| TaskInfo |
object |
The information about the request task. After a request task is successfully submitted, it is divided into multiple subtasks that are executed in sequence. The next subtask is executed only after the current subtask succeeds. The request task ends when all subtasks are completed. The request task is terminated in the following scenarios. You must resolve the issue based on the error code and then resubmit the request task:
|
|
| Status |
string |
The status of the current subtask. Valid values:
|
success |
| NextTaskId |
string |
The ID of the next subtask to be executed. If this field is empty, all subtasks are completed. You can use the obtained ID to query the status of the corresponding subtask by calling the GetDDLJobStatus operation. |
abc1 |
| TaskId |
string |
The ID of the current subtask. |
abc |
| Content |
string |
The detailed execution status of the current subtask. Details:
|
success |
Examples
Success response
JSON format
{
"RequestId": "abcde",
"TaskInfo": {
"Status": "success",
"NextTaskId": "abc1",
"TaskId": "abc",
"Content": "success"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 500 | InternalError.System | An internal system error occurred. Try again later. | |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | |
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | |
| 429 | Throttling.Api.Risk | The request for this resource has exceeded your daily available limit. | |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | |
| 429 | Throttling.User | Your request is too frequent. Try again later. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.