调用UpdateTable更新MaxCompute表。
目前该API接口已标记为弃用。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
IsView
deprecated
|
integer |
否 |
是否为视图,包括 0(否)和 1(是)。该字段已废弃,请勿使用。 |
0 |
| Visibility |
integer |
否 |
表的可见性,包括 0(对所有成员不可见)、1(对所有成员可见)和 2(对工作空间成员可见)。 |
1 |
| LifeCycle |
integer |
否 |
表的生命周期,单位为天。生命周期为空时,表示永久存储。 |
10 |
| CategoryId |
integer |
否 |
关联的类目 ID。 |
101 |
| LogicalLevelId |
integer |
否 |
逻辑层级 ID。 |
101 |
| PhysicsLevelId |
integer |
否 |
物理层级 ID。 |
101 |
ExternalTableType
deprecated
|
string |
否 |
外表的类型,包括 0(OSS)、1(TableStore)、2(Volume)和 3(MySQL)。该字段已废弃,请勿使用。 |
1 |
Location
deprecated
|
string |
否 |
外表的存储地址。该字段已废弃,请勿使用。 |
location |
| ProjectId |
integer |
否 |
DataWorks 工作空间的 ID。您可以登录 DataWorks 控制台获取工作空间 ID。 |
101 |
| TableName |
string |
是 |
MaxCompute 表名称。 |
abc |
| Endpoint |
string |
否 |
MaxCompute Endpoint。不填时,默认取项目对应的 Endpoint。 |
odps:// |
| EnvType |
integer |
否 |
DataWorks 工作空间的环境,包括 0(开发环境)和 1(生产环境)。 |
1 |
| AppGuid |
string |
否 |
MaxCompute 项目的唯一标识,格式为 odps.{projectName}。 |
odps.test |
CreateIfNotExists
deprecated
|
boolean |
否 |
表是否存在:
该字段已废弃,请勿使用。 |
true |
HasPart
deprecated
|
integer |
否 |
需要更新的 MaxCompute 表是否为分区表,包括 0(否)和 1(是)。该字段已废弃,请勿使用。 目前代码会根据 Column.N.isPartitionCol 参数判断 MaxCompute 表是否为分区表,当 Column.N.isPartition 参数取值为 1 时,则认为 MaxCompute 表为分区表。 |
0 |
| Comment |
string |
否 |
备注信息。 |
备注 |
| Schema |
string |
否 |
表 Schema 信息。在 ODPS,当您启动了三层模型时需要填写 Schema 信息。 |
default |
| Columns |
array<object> |
否 |
字段列表 |
|
|
object |
否 |
返回对象 |
||
| ColumnNameCn |
string |
否 |
字段的中文名称。 |
中文 |
| ColumnName |
string |
是 |
字段的名称。 |
abc |
| Comment |
string |
否 |
字段的备注。 |
备注 |
| ColumnType |
string |
是 |
字段的类型,请参见 MaxCompute 支持的字段类型。 |
string |
| SeqNumber |
integer |
否 |
字段的序号。如果字段为分区字段,则不支持配置 Columns.N.SeqNumber。 |
1 |
| Length |
integer |
否 |
字段的长度。 |
10 |
| IsPartitionCol |
boolean |
否 |
是否为分区字段,包括 0(否)和 1(是)。 |
0 |
| Themes |
array<object> |
否 |
字段列表 |
|
|
object |
否 |
返回对象 |
||
| ThemeId |
integer |
否 |
关联的主题 ID。 |
101 |
| ThemeLevel |
integer |
否 |
主题 ID 对应的层级。 |
101 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回对象 |
||
| RequestId |
string |
请求 ID。 |
abcde |
| TaskInfo |
object |
请求任务的信息。 请求任务提交成功后,会被分为多个子任务有序执行。当前子任务执行成功后,才会继续执行下一个子任务,所有子任务执行完毕,该请求任务结束。如下情况,请求任务会终止,您需要根据错误码信息解决问题后重新发起请求任务:
|
|
| Status |
string |
当前执行的子任务的状态信息。取值如下:
|
success |
| NextTaskId |
string |
即将执行的子任务 ID。如果该字段为空,则表示所有子任务均已结束。您可以使用获取到的 ID,从 GetDDLJobStatus 接口查询对应子任务的状态。 |
abc1 |
| TaskId |
string |
当前执行的子任务 ID。 |
abc |
| Content |
string |
当前子任务的执行状态详细信息。具体如下:
|
success |
示例
正常返回示例
JSON格式
{
"RequestId": "abcde",
"TaskInfo": {
"Status": "success",
"NextTaskId": "abc1",
"TaskId": "abc",
"Content": "success"
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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. | 没有权限,请授权 |
| 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. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。