全部產品
Search
文件中心

DataWorks:GetMetaTableFullInfo

更新時間:Jul 31, 2026

取得表的完整資訊(包括欄位資訊)。

說明

目前該API介面已標記為棄用。

介面說明

仅支持获取 EMR 引擎表的信息。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

TableGuid

string

表的唯一標識。您可以透過呼叫 GetMetaDBTableList ,取得表的唯一標識。

odps.engine_name.table_name

PageNum

integer

請求取得的頁碼數,用於分頁。

1

PageSize

integer

每頁顯示的條數,預設為 10 條,最大 100 條。

10

ClusterId

string

EMR 叢集的 ID,僅當資料類型為 EMR 時,需要設定該參數。

您可以登入 EMR 的控制台,取得叢集 ID。

C-010A704DA760****

DatabaseName

string

資料庫的名稱。僅當資料類型為 EMR 時,需要設定該參數。

您可以呼叫 ListMetaDB 介面取得。

abc

TableName

string

EMR 的表名稱。僅當資料類型為 EMR 時,需要設定該參數。

您可以透過呼叫 GetMetaDBTableList 介面,取得表名稱。

abc

DataSourceType

string

資料類型,當前僅支援取值為 EMR。

emr

返回參數

名稱

類型

描述

樣本值

object

返回的数据结构。

HttpStatusCode

integer

HTTP 状态码。

200

ErrorMessage

string

错误信息。

The specified parameters are invalid.

RequestId

string

请求 ID。用于定位日志,排查问题。

0bc1411515937****

Success

boolean

调用是否成功。

true

ErrorCode

string

错误码。

1031203110005

Data

object

业务数据。

TableName

string

表的名称。

table_name

Comment

string

表的备注信息。

comment

LifeCycle

integer

表的生命周期,单位为天。

5

CreateTime

integer

创建表的时间。该结果显示为时间戳,您可以根据使用的时区将时间戳转换为相应日期。

1589870293000

ProjectName

string

表所在工作空间的名称。

test

ProjectId

integer

表所在工作空间的 ID。

22

OwnerId

string

表所有者的 ID。

123

EnvType

integer

环境类型,取值如下:

  • 0 表示开发环境的表。

  • 1 表示生产环境的表。

1

LastAccessTime

integer

最后一次访问表的时间。该结果显示为时间戳,您可以根据使用的时区将时间戳转换为相应日期。

1589870294000

DataSize

integer

表占用的存储空间,单位为字节(B)。

10

LastModifyTime

integer

最后更新表的时间。该结果显示为时间戳,您可以根据使用的时区将时间戳转换为相应日期。

1589870294000

DatabaseName

string

数据库的名称。

abc

IsVisible

integer

表是否可见,取值如下:

  • 0 表示该表对工作空间成员可见。

  • 1 表示该表对租户内可见。

  • 2 表示该表在租户间均可见。

  • 3 表示该表仅对责任人可见。

1

TotalColumnCount

integer

字段的总数。

22

TableGuid

string

表的唯一标识。

odps.engine_name.table_name

PartitionKeys

string

分区键。

abc

LastDdlTime

integer

最后变更表结构的时间。该结果显示为时间戳,您可以根据使用的时区将时间戳转换为相应日期。

1589870294000

Location

string

Hive 表的存储地址。

hdfs://localhost:777/user/hadoop/test.txt

ClusterId

string

EMR 集群的 ID。

C-010A704DA760****

TenantId

integer

租户 ID。

12345

Schema

string

表 Schema 信息。

default

ColumnList

array<object>

字段列表。

object

返回的数据结构。

ColumnName

string

The name of the field.

1

ColumnGuid

string

The unique identifier of the field.

odps.engine_name.table_name.1

IsPartitionColumn

boolean

Indicates whether the field is a partition field. Valid values:

  • true

  • false

true

Comment

string

The remarks of the field.

comment

ColumnType

string

The data type of the field.

string

IsPrimaryKey

boolean

Indicates whether the field is a primary key. Valid values:

  • true

  • false

false

Position

integer

The sequence number of the field.

1

Caption

string

The description of the field.

data comment

IsForeignKey

boolean

Indicates whether the field is a foreign key. Valid values:

  • true

  • false

true

樣本

正常返回樣本

JSON格式

{
  "HttpStatusCode": 200,
  "ErrorMessage": "The specified parameters are invalid.",
  "RequestId": "0bc1411515937****",
  "Success": true,
  "ErrorCode": "1031203110005",
  "Data": {
    "TableName": "table_name",
    "Comment": "comment",
    "LifeCycle": 5,
    "CreateTime": 1589870293000,
    "ProjectName": "test",
    "ProjectId": 22,
    "OwnerId": "123",
    "EnvType": 1,
    "LastAccessTime": 1589870294000,
    "DataSize": 10,
    "LastModifyTime": 1589870294000,
    "DatabaseName": "abc",
    "IsVisible": 1,
    "TotalColumnCount": 22,
    "TableGuid": "odps.engine_name.table_name",
    "PartitionKeys": "abc",
    "LastDdlTime": 1589870294000,
    "Location": "hdfs://localhost:777/user/hadoop/test.txt",
    "ClusterId": "C-010A704DA760****",
    "TenantId": 12345,
    "Schema": "default",
    "ColumnList": [
      {
        "ColumnName": "1",
        "ColumnGuid": "odps.engine_name.table_name.1",
        "IsPartitionColumn": true,
        "Comment": "comment",
        "ColumnType": "string",
        "IsPrimaryKey": false,
        "Position": 1,
        "Caption": "data comment",
        "IsForeignKey": true
      }
    ]
  }
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidParameter.Meta.CommonError The specified parameter is invalid.
400 InvalidParameter.Meta.Illegal The app guid parameter is invalid.
400 InvalidParameter.Meta.IllegalDate The date format is invalid.
400 InvalidParameter.Meta.IllegalPageError The parameter for paging is invalid.
400 InvalidParameter.Meta.NotExist The object does not exist.
400 InternalError.Meta.NoCalcEngine An error occurred while retrieving the compute engine based on the MaxCompute project.
500 InternalError.System An internal system error occurred. Try again later.
500 InternalError.UserId.Missing An internal system error occurred. Try again later.
500 InternalError.Meta.TenantTimeOut Failed to connect to the interface network.
500 InternalError.Meta.Unknown An unknown error occurred while processing your request.
403 Forbidden.Meta.NoTenant The user is not the owner of any tenants.
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.

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情