列出MMA資料來源內的表
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
odps:ListMmsTables |
list |
*project
|
無 | 無 |
請求文法
GET /api/v1/mms/datasources/{sourceId}/tables HTTP/1.1
路徑參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| sourceId |
integer |
是 |
資料來源 ID |
2000015 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| onlyName |
boolean |
否 |
只擷取表的名字 |
false |
| dbId |
integer |
否 |
庫 ID |
197 |
| dbName |
string |
否 |
庫名 |
mms_test |
| name |
string |
否 |
表名 |
test |
| dstProjectName |
string |
否 |
目標 MaxCompute 專案名 |
mms_test |
| dstSchemaName |
string |
否 |
目標 MaxCompute schema 名,目標 MaxCompute 專案沒有開啟 schema 層時,該值為 null |
default |
| dstName |
string |
否 |
目標 MaxCompute table |
test |
| type |
string |
否 |
表類型 |
MANAGED_TABLE |
| hasPartitions |
boolean |
否 |
分區表 |
true |
| status |
array |
否 |
遷移狀態 |
test |
|
string |
否 |
遷移狀態 枚舉值:
|
["DONE", "FAILED"] |
|
| lastDdlTimeStart |
string |
否 |
lastDdlTime 開始時間 |
2024-12-17 15:44:42 |
| lastDdlTimeEnd |
string |
否 |
lastDdlTime 結束時間 |
2024-12-19 15:44:42 |
| pageNum |
integer |
否 |
頁碼 |
1 |
| pageSize |
integer |
否 |
分頁大小。 |
10 |
| sorter.numRows |
string |
否 |
根據行數排序 枚舉值:
|
desc |
| sorter.size |
string |
否 |
根據資料大小排序 枚舉值:
|
asc |
| sorter.lastDdlTime |
string |
否 |
根據 lastddltime 排序 枚舉值:
|
desc |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
傳回值 |
||
| requestId |
string |
請求 ID。 |
E7FB14F1-4ACD-5C73-A755-B302D70AB9AD |
| data |
object |
返回資料。 |
|
| total |
integer |
總記錄數。 |
100 |
| objectList |
array<object> |
table 列表 |
|
|
array<object> |
table 資訊 |
||
| id |
integer |
table ID |
1003476 |
| dbId |
integer |
庫 ID |
196 |
| dbName |
string |
庫名 |
demo |
| name |
string |
表名 |
test |
| dstProjectName |
string |
目標 MaxCompute 專案名 |
mms_test |
| dstSchemaName |
string |
目標 MaxCompute schema 名,目標 MaxCompute 專案沒有開啟 schema 層時,該值為 null |
default |
| dstName |
string |
目標 MaxCompute table 名,預設與源表名一致 |
test |
| type |
string |
表類型 |
MANAGED_TABLE |
| hasPartitions |
boolean |
是不是分區表 |
true |
| schema |
object |
表結構 |
|
| name |
string |
表名 |
test |
| comment |
string |
表注釋 |
for mms test |
| columns |
array<object> |
所有表普通列 |
|
|
object |
表普通列 |
||
| name |
string |
列名 |
user_id |
| type |
string |
列類型 |
bigint |
| comment |
string |
列注釋 |
user id |
| defaultValue |
string |
列預設值 |
"" |
| nullable |
boolean |
列是否可以為 null |
false |
| partitions |
array<object> |
所有分區列 |
|
|
object |
分區列 |
||
| name |
string |
列名 |
p1 |
| type |
string |
列類型 |
string |
| comment |
string |
列注釋 |
第一分區 |
| defaultValue |
string |
列預設值 |
abc |
| nullable |
boolean |
列是否為空白 |
false |
| owner |
string |
表 owner |
Hive |
| location |
string |
表格儲存體位置 |
| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo |
| inputFormat |
string |
inputFormat |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat |
| outputFormat |
string |
outputFormat |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat |
| serde |
string |
serde |
org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe |
| extra |
string |
以 JSON 格式儲存的其他資訊 |
{"mapkey.delim":":","collection.delim":",","serialization.format":"|","field.delim":"|"} |
| partitions |
integer |
分區數量 |
100 |
| partitionsDoing |
integer |
正在遷移的分區數量 |
20 |
| partitionsDone |
integer |
遷移完成的分區數量 |
60 |
| partitionsFailed |
integer |
遷移失敗的分區數量 |
40 |
| sourceId |
integer |
資料來源 ID |
2000028 |
| sourceName |
string |
資料來源名 |
demo |
| size |
integer |
資料大小-以 Bytes 為單位 |
2985028 |
| numRows |
integer |
行數 |
232323 |
| updated |
boolean |
中繼資料是否有更新 |
true |
| lastDdlTime |
string |
lastDdlTime |
2024-12-17 15:44:42 |
| status |
string |
遷移狀態 枚舉值:
|
DONE |
| pageNum |
integer |
頁 |
1 |
| pageSize |
integer |
分頁大小 |
20 |
樣本
正常返回樣本
JSON格式
{
"requestId": "E7FB14F1-4ACD-5C73-A755-B302D70AB9AD",
"data": {
"total": 100,
"objectList": [
{
"id": 1003476,
"dbId": 196,
"dbName": "demo",
"name": "test",
"dstProjectName": "mms_test",
"dstSchemaName": "default",
"dstName": "test",
"type": "MANAGED_TABLE",
"hasPartitions": true,
"schema": {
"name": "test",
"comment": "for mms test",
"columns": [
{
"name": "user_id",
"type": "bigint",
"comment": "user id",
"defaultValue": "\"\"",
"nullable": false
}
],
"partitions": [
{
"name": "p1",
"type": "string",
"comment": "第一分區",
"defaultValue": "abc",
"nullable": false
}
]
},
"owner": "Hive",
"location": "| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo",
"inputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat ",
"outputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat",
"serde": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe",
"extra": "{\"mapkey.delim\":\":\",\"collection.delim\":\",\",\"serialization.format\":\"|\",\"field.delim\":\"|\"} ",
"partitions": 100,
"partitionsDoing": 20,
"partitionsDone": 60,
"partitionsFailed": 40,
"sourceId": 2000028,
"sourceName": "demo ",
"size": 2985028,
"numRows": 232323,
"updated": true,
"lastDdlTime": "2024-12-17 15:44:42\n",
"status": "DONE"
}
],
"pageNum": 1,
"pageSize": 20
}
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。