UpdateTable

更新时间:
复制 MD 格式

Updates a MaxCompute table.

Note

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

IsView

integer

No

Specifies whether the table is a view. Valid values: 0 and 1. The value 0 indicates that the table is not a view. The value 1 indicates that the table is a view. This parameter is deprecated. Do not use this parameter.

0

Visibility

integer

No

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.

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 ID of the logical level.

101

PhysicsLevelId

integer

No

The ID of the physical layer.

101

ExternalTableType

string

No

The type of the external table. Valid values: 0, 1, 2, and 3. The value 0 indicates that the external table is an OSS external table. The value 1 indicates that the external table is a Tablestore external table. The value 2 indicates that the external table is a volume external table. The value 3 indicates that the external table is a MySQL external table. This parameter is deprecated. Do not use this parameter.

1

Location

string

No

The storage location of the external table. This parameter is deprecated. Do not use this parameter.

location

ProjectId

integer

No

The DataWorks workspace ID. You can log on to the DataWorks console to obtain the ID of the DataWorks workspace.

101

TableName

string

Yes

The name of the MaxCompute table.

abc

Endpoint

string

No

The endpoint of MaxCompute. If you do not specify this parameter, the endpoint of the MaxCompute project is used.

odps://

EnvType

integer

No

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.

1

AppGuid

string

No

The unique identifier of the MaxCompute project. Specify the GUID in the odps.{projectName} format.

odps.test

CreateIfNotExists

boolean

No

Specifies whether the table exists. Valid values:

  • true: The table exists.

  • false: The table does not exist.

This parameter is deprecated. Do not use this parameter.

true

HasPart

integer

No

Specifies whether the table that you want to update is a partitioned table. Valid values: 0 and 1. The value 0 indicates that the table is not a partitioned table. The value 1 indicates that the table is a partitioned table. This parameter is deprecated. Do not use this parameter. The Column.N.isPartitionCol parameter is used instead of the HasPart parameter to specify whether the MaxCompute table is a partitioned table. If the Column.N.isPartitionCol parameter is set to 1, the MaxCompute table is a partitioned table.

0

Comment

string

No

The comment.

Comment

Schema

string

No

The schema information of the table. You need to enter the schema information of the table if you enable the table schema in MaxCompute.

default

Columns

array<object>

No

The list of fields.

object

No

ColumnNameCn

string

No

The display name of the field.

Chinese name

ColumnName

string

Yes

The name of the field.

abc

Comment

string

No

The comment of the field.

Comment

ColumnType

string

Yes

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

string

SeqNumber

integer

No

The sequence number of the field. If the field is a partition field, this parameter is not supported.

1

Length

integer

No

The length of the field.

10

IsPartitionCol

boolean

No

Specifies whether the field is a partition field. Valid values: 0 and 1. The value 0 indicates that the field is not a partition field. The value 1 indicates that the field is a partition field.

0

Themes

array<object>

No

The list of fields.

object

No

ThemeId

integer

No

The ID of the associated topic.

101

ThemeLevel

integer

No

The level that corresponds to the topic ID.

101

Response elements

Element

Type

Description

Example

object

The returned result.

RequestId

string

The request ID.

abcde

TaskInfo

object

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 complete, the next subtask starts to run. After all subtasks are complete, the request task is complete. If a request task is terminated 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.

Status

string

The status of the current subtask. Valid values:

  • operating: The subtask is running.

  • success: The subtask succeeds.

  • failure: The subtask fails to run. For more information about the error details, see the Content parameter.

success

NextTaskId

string

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

abc1

TaskId

string

The ID of the current subtask.

abc

Content

string

The details about the status of the current subtask. Valid values:

  • If the current subtask is successful, success is returned.

  • If the current subtask fails, the error details are displayed.

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.