Lists the tables in a MaxCompute Migration Assist (MMA) data source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListMmsTables |
list |
*project
|
None | None |
Request syntax
GET /api/v1/mms/datasources/{sourceId}/tables HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| sourceId |
integer |
Yes |
The ID of the data source. |
2000015 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| onlyName |
boolean |
No |
Specifies whether to return only the names of the tables. |
false |
| dbId |
integer |
No |
The ID of the database. |
197 |
| dbName |
string |
No |
The name of the database. |
mms_test |
| name |
string |
No |
The name of the table. |
test |
| dstProjectName |
string |
No |
The name of the destination MaxCompute project. |
mms_test |
| dstSchemaName |
string |
No |
The name of the destination MaxCompute schema. This parameter is null if the destination MaxCompute project does not have a schema layer. |
default |
| dstName |
string |
No |
The name of the destination MaxCompute table. |
test |
| type |
string |
No |
The table type. |
MANAGED_TABLE |
| hasPartitions |
boolean |
No |
The partitioned table. |
true |
| status |
array |
No |
The migration status. |
test |
|
string |
No |
The migration status. Valid values:
|
["DONE", "FAILED"] |
|
| lastDdlTimeStart |
string |
No |
The start of the time range for lastDdlTime. |
2024-12-17 15:44:42 |
| lastDdlTimeEnd |
string |
No |
The end of the time range for lastDdlTime. |
2024-12-19 15:44:42 |
| pageNum |
integer |
No |
The page number. |
1 |
| pageSize |
integer |
No |
The number of entries to return on each page. |
10 |
| sorter.numRows |
string |
No |
The sort order for the number of rows. Valid values:
|
desc |
| sorter.size |
string |
No |
The sort order for the data size. Valid values:
|
asc |
| sorter.lastDdlTime |
string |
No |
The sort order for lastDdlTime. Valid values:
|
desc |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The return value. |
||
| requestId |
string |
The request ID. |
E7FB14F1-4ACD-5C73-A755-B302D70AB9AD |
| data |
object |
The returned data. |
|
| total |
integer |
The total number of records. |
100 |
| objectList |
array<object> |
The list of tables. |
|
|
array<object> |
The table information. |
||
| id |
integer |
The table ID. |
1003476 |
| dbId |
integer |
The database ID. |
196 |
| dbName |
string |
The database name. |
demo |
| name |
string |
The table name. |
test |
| dstProjectName |
string |
The name of the destination MaxCompute project. |
mms_test |
| dstSchemaName |
string |
The name of the destination MaxCompute schema. This parameter is null if the destination MaxCompute project does not have a schema layer. |
default |
| dstName |
string |
The name of the destination MaxCompute table. By default, this name is the same as the source table name. |
test |
| type |
string |
The table type. |
MANAGED_TABLE |
| hasPartitions |
boolean |
Indicates whether the table is a partitioned table. |
true |
| schema |
object |
The table schema. |
|
| name |
string |
The table name. |
test |
| comment |
string |
The comment on the table. |
for mms test |
| columns |
array<object> |
All non-partition key columns of the table. |
|
|
object |
A non-partition key column. |
||
| name |
string |
The column name. |
user_id |
| type |
string |
The column type. |
bigint |
| comment |
string |
The comment on the column. |
user id |
| defaultValue |
string |
The default value of the column. |
"" |
| nullable |
boolean |
Indicates whether the column can be null. |
false |
| partitions |
array<object> |
All partition key columns. |
|
|
object |
A partition key column. |
||
| name |
string |
The column name. |
p1 |
| type |
string |
The column type. |
string |
| comment |
string |
The comment on the column. |
第一分区 |
| defaultValue |
string |
The default value of the column. |
abc |
| nullable |
boolean |
Indicates whether the column can be null. |
false |
| owner |
string |
The owner of the table. |
Hive |
| location |
string |
The storage location of the table. |
| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo |
| inputFormat |
string |
The input format. |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat |
| outputFormat |
string |
The output format. |
org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat |
| serde |
string |
The serializer/deserializer (SerDe). |
org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe |
| extra |
string |
Other information stored in JSON format. |
{"mapkey.delim":":","collection.delim":",","serialization.format":"|","field.delim":"|"} |
| partitions |
integer |
The number of partitions. |
100 |
| partitionsDoing |
integer |
The number of partitions that are being migrated. |
20 |
| partitionsDone |
integer |
The number of partitions that are migrated. |
60 |
| partitionsFailed |
integer |
The number of partitions that failed to be migrated. |
40 |
| sourceId |
integer |
The ID of the data source. |
2000028 |
| sourceName |
string |
The name of the data source. |
demo |
| size |
integer |
The data size in bytes. |
2985028 |
| numRows |
integer |
The number of rows. |
232323 |
| updated |
boolean |
Indicates whether the metadata is updated. |
true |
| lastDdlTime |
string |
The last DDL time. |
2024-12-17 15:44:42 |
| status |
string |
The migration status. Valid values:
|
DONE |
| pageNum |
integer |
The page number. |
1 |
| pageSize |
integer |
The number of entries per page. |
20 |
Examples
Success response
JSON format
{
"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
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.