Updates the field data in 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 UpdateTableAddColumn

The operation that you want to perform.

Column.N.ColumnName String Yes abc

The name of the field.

Column.N.ColumnType String Yes string

The type of the field. For more information, see MaxCompute field types.

RegionId String Yes cn-shanghai

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system automatically determines the value of this parameter based on the endpoint that is used to call the operation.

TableGuid String Yes odps.engine_name.table_name

The globally unique identifier (GUID) of the MaxCompute table. Specify the GUID in the format of odps.projectName.tableName.

Column.N.ColumnNameCn String No Display name

The display name of the field.

Column.N.Comment String No Comment

The comment of the field.

Response parameters

Parameter Type Example Description
RequestId String abc

The ID of the request.

TaskInfo Struct

The information about the request task.

After a request task is submitted, it is divided into multiple subtasks that are run in sequence. After the current subtask is completed, the next subtask starts to run. After all subtasks are completed, the request task is completed. If a request task is aborted due to one of the following issues, address the issue based on the error code and initiate the request task again:

  • The request task fails to be submitted.
  • After the request task is submitted, a subtask fails to run.
Content String success

Details about the status of the current subtask.

  • If the current subtask succeeds, success is returned.
  • If the current subtask fails, the error details are displayed.
NextTaskId String abc1

The ID of the subtask to run. If this parameter is left empty, all subtasks are completed. You can call the GetDDLJobStatus operation to query the status of the subtask based on the subtask ID.

Status String success

The status of the current subtask. Valid values:

  • operating: The subtask is running.
  • success: The subtask succeeds.
  • failure: The subtask fails. For detailed error information, see the Content parameter.
TaskId String abc2

The ID of the current subtask.

Examples

Sample requests

http(s)://[Endpoint]/?Action=UpdateTableAddColumn
&Column.1.ColumnName=abc
&Column.1.ColumnType=string
&RegionId=cn-shanghai
&TableGuid=odps.engine_name.table_name
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

HTTP status code Error code Error message Description
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.
429 Throttling.Api The request for this resource has exceeded your available limit. The error message returned because the maximum number of requests for the resource has been reached.
429 Throttling.Api.Risk The request for this resource has exceeded your daily available limit. The error message returned because the maximum number of requests per day for the resource has been reached.
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 in a short period of time. Try again later.
403 Forbidden.Access Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. The error message returned because you are not allowed to perform this operation. Activate DataWorks Enterprise Edition or DataWorks Ultimate Edition.

For a list of error codes, visit the API Error Center.