全部產品
Search
文件中心

DataWorks:GetMetaTableFullInfo

更新時間:Sep 03, 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

欄位的名稱。

1

ColumnGuid

string

欄位的唯一識別碼。

odps.engine_name.table_name.1

IsPartitionColumn

boolean

欄位是否為分區欄位,取值如下:

  • true,是分區欄位。

  • false,不是分區欄位。

true

Comment

string

欄位的備註。

comment

ColumnType

string

欄位的類型。

string

IsPrimaryKey

boolean

欄位是否為主鍵,取值如下:

  • true,是主鍵。

  • false,不是主鍵。

false

Position

integer

欄位的排序。

1

Caption

string

欄位的描述資訊。

data comment

IsForeignKey

boolean

欄位是否為外鍵,取值如下:

  • 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. App參數錯誤。
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. 使用者輸入的 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.

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

變更歷史

更多資訊,參考變更詳情。