获取表信息
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求语法
GET /api/v1/projects/{projectName}/tables/{tableName} HTTP/1.1
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
projectName | string | 是 | 项目名称。 | projectA |
schemaName | string | 否 | schema 名称。 | default |
tableName | string | 是 | 表名 | sale_detail |
type | string | 否 | 表类型。 枚举值:
| internal |
返回参数
示例
正常返回示例
JSON
格式
{
"requestId": "0a06dd4516687375802853481ec9fd",
"data": {
"name": "sale_detail",
"owner": "188785396123****",
"type": "-**internal**:内部表。\n-**external**:外部表。\n-**view**:视图。\n-**materializedView**:物化视图。",
"schema": "default",
"creationTime": 0,
"viewText": "select shop_name, sum(total_price) from sale_detail group by shop_name",
"displayName": "project_name.schema_name.table_name",
"projectName": "projectA",
"lastDDLTime": 0,
"lastModifiedTime": 0,
"lastAccessTime": 0,
"lifecycle": "-1",
"isExternalTable": false,
"size": 5372,
"comment": "sale_detail",
"tableLabel": "0",
"createTableDDL": "create table if not exists sale_detail( shop_name STRING, customer_id STRING, total_price DOUBLE) partitioned by (sale_date STRING, region STRING);",
"nativeColumns": [
{
"name": "shop_name",
"type": "STRING",
"label": "0",
"comment": "商店名称"
}
],
"partitionColumns": [
{
"name": "sale_date",
"type": "STRING",
"label": "0",
"comment": "销售日期"
}
],
"materializedView": false,
"rewriteEnabled": false,
"autoRefreshEnabled": false,
"isOutdated": false,
"physicalSize": 2763,
"fileNum": 200,
"storageHandler": "com.aliyun.odps.CsvStorageHandler",
"location": "外部表地址\n\noss://oss-cn-hangzhou-internal.aliyuncs.com/oss-mc-test/Demo1/",
"odpsPropertiesRolearn": "acs:ram::xxxxx:role/aliyunodpsdefaultrole",
"tablestoreColumnsMapping": ":o_orderkey,:o_orderdate,o_custkey,o_orderstatus,o_totalprice",
"tablesotreTableName": "ots_tpch_orders",
"odpsSqlTextOptionFlushHeader": true,
"odpsTextOptionHeaderLinesCount": 1
}
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|
暂无变更历史