调用UpdateMetaTable更新表的Meta信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String UpdateMetaTable

系统规定参数。取值:UpdateMetaTable

ProjectId Long 101

DataWorks工作空间的ID。

TableName String table1

表的名称。

EnvType Integer 1

DataWorks的环境,包括0(开发环境)和1(生产环境)。

TableGuid String odps.test.table1

表的唯一标识,格式为odps.{projectName}.{tableName}。

NewOwnerId String 12345

新的OwnerId,为空时不更新。

AddedLabels String a,b,c

需要增加的标签名称,使用英文逗号(,)分隔。

RemovedLabels String a,b,c

需要删除的标签名称,使用英文逗号(,)分隔。

CategoryId Long 101

需要关联的类目ID。

Visibility Integer 1

编辑表的可见性,包括0(不可见)、1(可见)和2(工作空间可见)。

Caption String 中文名

表的中文名称。

Schema String default

表Schema信息。在ODPS,用户启动了三层模型需要填写Schema信息。

返回数据

名称 类型 示例值 描述
UpdateResult Boolean true

是否更新成功。

RequestId String abcde

请求ID。

示例

请求示例

http(s)://[Endpoint]/?Action=UpdateMetaTable
&ProjectId=101
&TableName=table1
&EnvType=1
&TableGuid=odps.test.table1
&NewOwnerId=12345
&AddedLabels=a,b,c
&RemovedLabels=a,b,c
&CategoryId=101
&Visibility=1
&Caption=中文名
&Schema=default
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateMetaTableResponse>
    <UpdateResult>true</UpdateResult>
    <RequestId>abcde</RequestId>
</UpdateMetaTableResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "UpdateResult" : true,
  "RequestId" : "abcde"
}

错误码

HttpCode 错误码 错误信息 描述
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. DataWorks系统繁忙,请稍后再试。
429 Throttling.User Your request is too frequent. Try again later. 您的请求过于频繁,请尝试放缓请求速度。
500 InternalError.System An internal system error occurred. Try again later. 系统内部错误,请稍后再试。
500 InternalError.UserId.Missing An internal system error occurred. Try again later. 系统内部错误,请稍后再试。

访问错误中心查看更多错误码。