GetTable - 获取数据表详情

获取数据湖中数据表的详细信息。

调试

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

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用前面加 * 表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
dlf:GetTableget
*全部资源
*

请求语法

GET /dlf/v1/{catalogId}/databases/{database}/tables/{table} HTTP/1.1

请求参数

名称类型必填描述示例值
catalogIdstring

数据目录 ID。

clg-paimon-xxxx
databasestring

数据库名称。

database_name
tablestring

数据表名称。

table_name

返回参数

名称类型描述示例值
Table

数据表。

示例

正常返回示例

JSON格式

{
  "id": 1,
  "name": "table_test",
  "path": "oss://clg-paimon-xxx/db-xxx/tbl-xxxx",
  "isExternal": true,
  "schemaId": 1,
  "schema": {
    "primaryKeys": [
      "order_id"
    ],
    "options": {
      "key": "bucket : 5"
    },
    "comment": "description",
    "partitionKeys": [
      "pt"
    ],
    "fields": [
      {
        "name": "order_id",
        "description": "description",
        "id": 1,
        "type": {
          "type": "STRING",
          "fields": [
            {
              "name": "order_id",
              "description": "description",
              "id": 1,
              "type": {
                "type": "STRING",
                "fields": [
                  {
                    "name": "order_id",
                    "description": "description",
                    "id": 1,
                    "type": {
                      "type": "STRING",
                      "fields": []
                    }
                  }
                ]
              }
            }
          ]
        }
      }
    ]
  },
  "owner": "acs:ram::[accountId]:root",
  "createdAt": 1741266704867,
  "createdBy": "acs:ram::[accountId]:root",
  "updatedAt": 1741266704867,
  "updatedBy": "acs:ram::[accountId]:root",
  "storageClass": "",
  "storageAction": "",
  "storageActionTimestamp": 0
}

错误码

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