Updates a MaxCompute table.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateTable

The operation that you want to perform.

Columns.N.ColumnName String Yes abc

The name of the field.

Columns.N.ColumnType String Yes string

For more information about field types, see field types in MaxCompute.

HasPart Integer Yes 0

Indicates whether the partition table is used. Valid values: 0 and 1.

RegionId String Yes cn-shanghai

The ID of the region where the event log was recorded.

TableName String Yes abc

The name of the MaxCompute table.

Columns.N.ColumnNameCn String No Chinese characters

The display name of the field.

Columns.N.SeqNumber Integer No 1

The ordinal number of the field.

Columns.N.Length Integer No 10

The length of the field.

Columns.N.IsPartitionCol Integer No 0

Indicates whether the partition table is valid. Valid values: 0 and 1.

Columns.N.IsPrimaryKey Integer No 0

Specifies whether the field is a primary key. Valid values: 0 and 1.

Columns.N.IsNullable Integer No 1

Optional. This parameter specifies whether to allow empty values. Valid values: 0 and 1.

Columns.N.Comment String No Remarks

The description of the field.

IsView Integer No 0

Indicates whether the view is a view. Valid values: 0 and 1.

Visibility Integer No 1

Visibility of the table, including 0 (invisible), 1 (visible), and 2 (visible in the workspace).

LifeCycle Integer No 10

The lifecycle of the table. Permanent storage when lifecycle is empty.

CategoryId Long No 101

The ID of the associated category.

LogicalLevelId Long No 101

Logical level ID.

PhysicsLevelId Long No 101

The ID of the physical level.

ExternalTableType String No 1

The type of the external table. Valid values: 0(OSS), 1 (table store), 2(Volume), and 3(MySQL).

Location String No location

The storage address of the external table.

ProjectId Long No 101

The ID of the DataWorks workspace.

Endpoint String No odps://

The endpoint of MaxCompute. If not specified, the corresponding Endpoint of the project is used by default.

EnvType Integer No 1

DataWorks the environment of the workspace, including 0 (Development Environment) and 1 (production environment).

Themes.N.ThemeId Long No 101

The ID of the associated topic.

Themes.N.ThemeLevel Integer No 101

The level of the specified topic ID.

AppGuid String No odps.test

The unique ID of the MaxCompute project, in the format of odps.{projectName}.

CreateIfNotExists Boolean No true

Indicates whether the table exists. Valid values:

  • true
  • false

Response parameters

Parameter Type Example Description
RequestId String abcde

The ID of the request.

TaskInfo Struct

The information about the update table task.

Content String success

The content of the task.

NextTaskId String abc1

The ID of the task in progress. If you do not specify the parameter, the tasks have all ended.

Status String success

The status of completed tasks.

TaskId String abc

The ID of the completed task.

Examples

Sample requests


     http(s)://[Endpoint]/? Action=UpdateTable &Columns.1.ColumnName=abc &Columns.1.ColumnType=string &HasPart=0 &RegionId=cn-shanghai &TableName=abc &<common request parameters> 
   

Sample success responses

XML format


     <TaskInfo> <Status>success</Status> <TaskId>abc</TaskId> <Content>success</Content> <NextTaskId>abc1</NextTaskId> </TaskInfo> <RequestId>abcde</RequestId> 
   

JSON Format


     { "TaskInfo": { "Status": "success", "TaskId": "abc", "Content": "success", "NextTaskId": "abc1" }, "RequestId": "abcde" } 
   

Error codes

HttpCode Error codes Error message Description
500 InternalError.System An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later. An internal system error occurred. Please try again later.
429 Throttling.Api The request for this resource has exceeded your available limit. The request for the resource exceeds your available upper limit.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The request for the resource has exceeded your daily availability limit.
429 Throttling.System The DataWorks system is busy. Try again later. DataWorks the system is busy, please try again later.
429 Throttling.User Your request is too frequent. Try again later. Your request is too frequent, please try to slow down the request speed.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. You have restricted access. Please activate DataWorks Enterprise Edition or above.

Go to the Error CenterFor more information, see error codes.