Retrieves a table from a MaxCompute Migration Assist (MMA) data source.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
odps:GetMmsTable | get | *project
| None | None |
Request syntax
GET /api/v1/mms/datasources/{sourceId}/tables/{tableId} HTTP/1.1Request parameters
Parameter | Type | Required | Description | Example |
sourceId | integer | Yes | The data source ID. | 12323 |
tableId | integer | Yes | The table ID. | 22 |
Response elements
Element | Type | Description | Example |
object | ApiRes | ||
requestId | string | The request ID. | E7FB14F1-4ACD-5C73-A755-B302D70AB9AD |
| data | object | The returned data. | |
id | integer | The table ID. | 22 |
dbId | integer | The database ID. | 3 |
dbName | string | The database name. | mms_test |
name | string | The table name. | test |
dstProjectName | string | mms_test | |
dstSchemaName | string | default | |
dstName | string | test | |
type | string | The table type. | MANAGED_TABLED |
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 of the table. | for mms test |
| columns | array<object> | All common columns. | |
object | A common column. | ||
name | string | The column name. | user_id |
type | string | The data type of the column. | bigint |
comment | string | The comment of the column. | user id |
defaultValue | string | The default value of the column. | 10 |
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 data type of the column. | string |
comment | string | The comment of the column. | first partition level |
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 the 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. | 80 |
partitionsFailed | integer | The number of partitions that failed to be migrated. | 0 |
sourceId | integer | The data source ID. | 2000028 |
sourceName | string | The data source name. | demo |
size | integer | The data size in bytes. | 23232 |
numRows | integer | The number of rows. | 233232 |
updated | boolean | Indicates whether the metadata is updated. | false |
lastDdlTime | string | The last DDL time. | 2024-12-17 15:44:42 |
status | string | The migration status. Valid values:
| DONE |
Examples
Success response
JSON format
{
"requestId": "E7FB14F1-4ACD-5C73-A755-B302D70AB9AD\n",
"data": {
"id": 22,
"dbId": 3,
"dbName": "mms_test",
"name": "test",
"dstProjectName": "mms_test",
"dstSchemaName": "default",
"dstName": "test",
"type": "MANAGED_TABLED",
"hasPartitions": true,
"schema": {
"name": "test",
"comment": "for mms test",
"columns": [
{
"name": "user_id",
"type": "bigint",
"comment": "user id",
"defaultValue": "10",
"nullable": false
}
],
"partitions": [
{
"name": "p1",
"type": "string",
"comment": "first partition level",
"defaultValue": "abc",
"nullable": false
}
]
},
"owner": "Hive\n",
"location": "| hdfs://master-1-1.c-c127cd184bb029ea.cn-zhangjiakou.emr.aliyuncs.com:9000/user/hive/warehouse/demo\n",
"inputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat \n",
"outputFormat": "org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat\n",
"serde": "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe\n",
"extra": "{\"mapkey.delim\":\":\",\"collection.delim\":\",\",\"serialization.format\":\"|\",\"field.delim\":\"|\"} \n",
"partitions": 100,
"partitionsDoing": 20,
"partitionsDone": 80,
"partitionsFailed": 0,
"sourceId": 2000028,
"sourceName": "demo",
"size": 23232,
"numRows": 233232,
"updated": false,
"lastDdlTime": "2024-12-17 15:44:42\n",
"status": "DONE"
}
}Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.