Retrieves a database from a MaxCompute Migration Assist (MMA) data source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:GetMmsDb |
get |
*project
|
None | None |
Request syntax
GET /api/v1/mms/datasources/{sourceId}/dbs/{dbId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| sourceId |
integer |
Yes |
The ID of the data source. |
2000017 |
| dbId |
integer |
Yes |
The database ID. |
1232 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
ApiRes |
||
| requestId |
string |
The request ID. |
90D64EB6-2962-5B1C-A039-BC41C8176C7F |
| data |
object |
The data returned. |
|
| id |
integer |
The database ID. |
63 |
| name |
string |
The database name. |
mms_test |
| description |
string |
The database description. |
for mms_test |
| owner |
string |
The database owner. |
System user |
| location |
string |
The storage location of the database. |
hdfs://master-1-1.c-6fc187819ed6bae0.cn-shanghai.emr.aliyuncs.com:9000/user/hive/warehouse |
| extra |
string |
Other information stored in JSON format. |
{} |
| tables |
integer |
The number of tables. |
200 |
| tablesDoing |
integer |
The tables that are being migrated. |
20 |
| tablesDone |
integer |
Tables for which migration has completed |
120 |
| tablesPartDone |
integer |
The tables whose migration is partially complete. |
20 |
| tablesFailed |
integer |
The tables that failed to migrate. |
20 |
| partitions |
integer |
The number of partitions. |
2000 |
| partitionsDoing |
integer |
The partitions that are being migrated. |
200 |
| partitionsDone |
integer |
The number of partitions whose migration is complete. |
1400 |
| partitionsFailed |
integer |
The partitions that failed during migration. |
400 |
| sourceId |
integer |
The ID of the data source. |
2000017 |
| sourceName |
string |
The name of the data source. |
demo |
| size |
integer |
The size of the database in bytes. |
323232332 |
| numRows |
integer |
The number of rows in the database. |
2323 |
| 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: INIT, DOING, FAILED, DONE, and PART_DONE. Valid values:
|
DOING |
| dstName |
string |
The MaxCompute schema corresponding to the source database. If the destination MaxCompute project does not enable the schema layer, this value is null. By default, this value matches the source database name. |
default |
| dstProjectName |
string |
The name of the destination MaxCompute project. |
mma_test |
Examples
Success response
JSON format
{
"requestId": "90D64EB6-2962-5B1C-A039-BC41C8176C7F",
"data": {
"id": 63,
"name": "mms_test",
"description": "for mms_test",
"owner": "System user",
"location": " hdfs://master-1-1.c-6fc187819ed6bae0.cn-shanghai.emr.aliyuncs.com:9000/user/hive/warehouse ",
"extra": "{}",
"tables": 200,
"tablesDoing": 20,
"tablesDone": 120,
"tablesPartDone": 20,
"tablesFailed": 20,
"partitions": 2000,
"partitionsDoing": 200,
"partitionsDone": 1400,
"partitionsFailed": 400,
"sourceId": 2000017,
"sourceName": "demo",
"size": 323232332,
"numRows": 2323,
"updated": true,
"lastDdlTime": "2024-12-17 15:44:42\n",
"status": "DOING",
"dstName": "default",
"dstProjectName": "mma_test"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.