獲取表信息。
接口說明
- 地域的公網接入地址:
adb.<region-id>.aliyuncs.com
。示例:adb.cn-hangzhou.aliyuncs.com
。 - 地域的 VPC 接入地址:
adb-vpc.<region-id>.aliyuncs.com
。示例:adb-vpc.cn-hangzhou.aliyuncs.com
。
調試
您可以在OpenAPI Explorer中直接運行該接口,免去您計算簽名的困擾。運行成功后,OpenAPI Explorer可以自動生成SDK代碼示例。
授權信息
下表是API對應的授權信息,可以在RAM權限策略語句的Action
元素中使用,用來給RAM用戶或RAM角色授予調用此API的權限。具體說明如下:
- 操作:是指具體的權限點。
- 訪問級別:是指每個操作的訪問級別,取值為寫入(Write)、讀取(Read)或列出(List)。
- 資源類型:是指操作中支持授權的資源類型。具體說明如下:
- 對于必選的資源類型,用背景高亮的方式表示。
- 對于不支持資源級授權的操作,用
全部資源
表示。
- 條件關鍵字:是指云產品自身定義的條件關鍵字。
- 關聯操作:是指成功執行操作所需要的其他權限。操作者必須同時具備關聯操作的權限,操作才能成功。
操作 | 訪問級別 | 資源類型 | 條件關鍵字 | 關聯操作 |
---|---|---|---|---|
adb:getTable | get | *全部資源 * |
| 無 |
請求參數
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
DbName | string | 是 | 數據庫名。 | dbName |
TableName | string | 是 | 查詢表名。 | tableName |
DBClusterId | string | 是 | 集群 ID。 | amv-******* |
RegionId | string | 是 | 地域 ID。 | cn-hangzhou |
返回參數
示例
正常返回示例
JSON
格式
{
"RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
"Code": 0,
"Message": "\"\"",
"Success": true,
"Table": {
"TblId": 123,
"DbName": "example",
"TableName": "tableName",
"TableType": "external_table",
"PartitionKeys": [
{
"Name": "name",
"Type": "long",
"Comment": "comment",
"DatabaseName": "databaseName",
"TableName": "tableName",
"MappedName": "mappedName",
"DataType": "long",
"CreateTime": "2023-01-05 13:17:55",
"UpdateTime": "2023-01-05 13:17:55",
"PkPosition": -1,
"IsPartitionKey": false,
"OrdinalPosition": -1,
"ColumnRawName": "ColumnRawName",
"PhysicalColumnName": "PhysicalColumnName",
"Nullable": true,
"AutoIncrement": true,
"Precision": 1,
"Scale": 1,
"Primarykey": true,
"DefaultValue": "default",
"Tokenizer": "tokenizer",
"Encode": "encode",
"Compression": "compression",
"Delimiter": "delimiter",
"ValueType": "valueType",
"CompressFloatUseShort": false,
"OnUpdate": "onUpdate"
}
],
"Parameters": {
"key": "key:value"
},
"Sd": {
"SdId": 1,
"Location": "oss://**************",
"InputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
"OutputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat",
"Compressed": false,
"NumBuckets": 1,
"SerDeInfo": {
"SerDeId": 123,
"Name": "example",
"Parameters": {
"key": "key:value"
},
"SerializationLib": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"
},
"Parameters": {
"key": "key:value"
},
"StoredAsSubDirectories": false
},
"CreateTime": "2023-01-05 13:17:55",
"ViewOriginalText": "ViewOriginalText",
"ViewExpandedText": "ViewExpandedText",
"Temporary": false,
"Comment": "description",
"Cols": [
{
"Name": "name",
"Type": "long",
"Comment": "comment",
"DatabaseName": "databaseName",
"TableName": "tableName",
"MappedName": "mappedName",
"DataType": "long",
"CreateTime": "2023-01-05 13:17:55",
"UpdateTime": "2023-01-05 13:17:55",
"PkPosition": -1,
"IsPartitionKey": false,
"OrdinalPosition": -1,
"ColumnRawName": "ColumnRawName",
"PhysicalColumnName": "PhysicalColumnName",
"Nullable": true,
"AutoIncrement": true,
"Precision": 1,
"Scale": 1,
"Primarykey": true,
"DefaultValue": "default",
"Tokenizer": "tokenizer",
"Encode": "encode",
"Compression": "compression",
"Delimiter": "delimiter",
"ValueType": "valueType",
"CompressFloatUseShort": false,
"OnUpdate": "onUpdate"
}
],
"DistributeColumns": [
{
"Name": "name",
"Type": "long",
"Comment": "comment",
"DatabaseName": "databaseName",
"TableName": "tableName",
"MappedName": "mappedName",
"DataType": "long",
"CreateTime": "2023-01-05 13:17:55",
"UpdateTime": "2023-01-05 13:17:55",
"PkPosition": -1,
"IsPartitionKey": false,
"OrdinalPosition": -1,
"ColumnRawName": "ColumnRawName",
"PhysicalColumnName": "PhysicalColumnName",
"Nullable": true,
"AutoIncrement": true,
"Precision": 1,
"Scale": 1,
"Primarykey": true,
"DefaultValue": "default",
"Tokenizer": "tokenizer",
"Encode": "encode",
"Compression": "compression",
"Delimiter": "delimiter",
"ValueType": "valueType",
"CompressFloatUseShort": false,
"OnUpdate": "onUpdate"
}
],
"PhysicalTableName": "physicalTableName",
"PhysicalDatabaseName": "physicalDatabaseName",
"DistributeType": "DistributeType",
"PartitionType": "PartitionType",
"PartitionColumn": "colName",
"PartitionCount": 16,
"PreviousVersion": 1,
"CurrentVersion": 2,
"UpdateTime": "2023-01-05 13:17:55",
"TableEngineName": "hive",
"IsAllIndex": true,
"BlockSize": 64,
"Compression": "Compression",
"RawTableName": "RawTableName",
"SubpartitionType": "SubpartitionColumn",
"SubpartitionColumn": "SubpartitionColumn",
"SubpartitionCount": 64,
"ArchiveType": "ArchiveType",
"MaxColumnId": 0,
"EnableDfs": false,
"StoragePolicy": "StoragePolicy",
"HotPartitionCount": 32,
"IsFulltextDict": false,
"RtIndexAll": false,
"RouteColumns": [],
"RtEngineType": "RtEngineType",
"RtModeType": "RtModeType",
"RouteType": "routeType",
"DictEncode": false,
"BucketCount": 16,
"Bucket": 16,
"ViewSecurityMode": "ViewSecurityMode",
"Indexes": [
{
"DatabaseName": "exampleDatabase",
"PhysicalTableName": "physicalDatabase",
"IndexName": "indexName",
"IndexType": "NORMAL",
"IndexColumns": [],
"ColumnOrds": [
"ASC/DESC"
],
"Options": {
"key": "key:value"
},
"CreateTime": "2023-01-05 13:17:55",
"UpdateTime": "2023-01-05 13:17:55"
}
]
}
}
錯誤碼
HTTP status code | 錯誤碼 | 錯誤信息 | 描述 |
---|---|---|---|
400 | MDS.IllegalArgument | Invalid argument. | 用戶使用了非法參數 |
400 | MDS.InvalidPrivilege | No permissions. | 用戶無權限進行操作 |
400 | MDS.MetaSchemaAlreadyExist | The database already exists. | 數據庫已存在 |
400 | MDS.MetaSchemaNotExist | The database does not exist. | 操作的數據庫不存在 |
400 | MDS.MetaTableAlreadyExist | The table already exists. | 操作的表已經存在 |
400 | MDS.MetaTableNotExist | The table is not found. | 操作的表不存在 |
500 | MDS.InternalError | An internal MDS error occurred. | MDS服務內部錯誤 |
500 | MDS.MetaVisitError | Failed to access metadata. | 訪問元數據失敗 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
變更時間 | 變更內容概要 | 操作 |
---|---|---|
2024-06-18 | OpenAPI 去除了 deprecated 標記、OpenAPI 錯誤碼發生變更 | 查看變更詳情 |
2023-12-21 | OpenAPI 錯誤碼發生變更 | 查看變更詳情 |
2023-10-19 | OpenAPI 變更為 deprecated,即將下線、OpenAPI 錯誤碼發生變更 | 查看變更詳情 |
2023-03-22 | OpenAPI 錯誤碼發生變更 | 查看變更詳情 |