List databases in the MMA data source.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
odps:ListMmsDbs |
list |
*Project
|
None | None |
Request syntax
GET /api/v1/mms/datasources/{sourceId}/dbs HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| sourceId |
integer |
Yes |
Data source ID |
2000018 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| name |
string |
No |
Data source name |
demo |
| status |
string |
No |
Data source status Valid values:
|
STARTED |
| sorter |
object |
No |
Sorting conditions |
|
| numRows |
string |
No |
Number of data rows in the database Valid values:
|
desc |
| size |
string |
No |
Size of data in the database Valid values:
|
asc |
| updateTime |
string |
No |
Update time |
2024-12-17 15:44:17 |
| pageNum |
integer |
No |
Page number |
1 |
| pageSize |
integer |
No |
Number of records per page |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Return value |
||
| requestId |
string |
Request ID. |
CF3F9978-260F-5204-94BE-30A4E6B54443 |
| data |
object |
Returned data. |
|
| total |
integer |
Total number of records. |
13 |
| objectList |
array<object> |
Database list |
|
|
object |
Database information |
||
| id |
integer |
Database ID |
1530 |
| name |
string |
Database name |
mms_test |
| description |
string |
Database description |
for mms test |
| owner |
string |
Database owner |
System user |
| location |
string |
Database storage location |
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 |
Number of tables |
100 |
| tablesDoing |
integer |
Tables being migrated |
20 |
| tablesDone |
integer |
Tables migrated |
20 |
| tablesPartDone |
integer |
Partially migrated tables |
20 |
| tablesFailed |
integer |
Failed tables |
20 |
| partitions |
integer |
Number of partitions |
1000 |
| partitionsDoing |
integer |
Partitions being migrated |
400 |
| partitionsDone |
integer |
Partitions migrated |
200 |
| partitionsFailed |
integer |
Failed partitions |
200 |
| sourceId |
integer |
Data source ID. |
2000015 |
| sourceName |
string |
Data source name |
demo |
| size |
integer |
Database data size in bytes |
2342342 |
| numRows |
integer |
Number of database data rows |
23232 |
| updated |
boolean |
Whether data is updated |
true |
| lastDdlTime |
string |
Last DDL Time |
2024-12-17 15:44:42 |
| createTime |
string |
Time created in MMS |
2024-12-17 15:44:42 |
| updateTime |
string |
Latest data update time |
2024-12-17 15:44:42 |
| status |
string |
Migration status: INIT, DOING, FAILED, DONE, PART_DONE Valid values:
|
DOING |
| deleted |
boolean |
Whether deleted |
false |
| dstProjectName |
string |
Target MaxCompute project name |
mms_test |
| dstName |
string |
The MaxCompute schema corresponding to the source database. If the target MaxCompute project does not have a schema layer enabled, this value is null. By default, it is consistent with the source database name. |
default |
| pageSize |
integer |
Page size |
10 |
| pageNum |
integer |
Page number |
1 |
Examples
Success response
JSON format
{
"requestId": "CF3F9978-260F-5204-94BE-30A4E6B54443",
"data": {
"total": 13,
"objectList": [
{
"id": 1530,
"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": 100,
"tablesDoing": 20,
"tablesDone": 20,
"tablesPartDone": 20,
"tablesFailed": 20,
"partitions": 1000,
"partitionsDoing": 400,
"partitionsDone": 200,
"partitionsFailed": 200,
"sourceId": 2000015,
"sourceName": "demo",
"size": 2342342,
"numRows": 23232,
"updated": true,
"lastDdlTime": "2024-12-17 15:44:42\n",
"createTime": "2024-12-17 15:44:42\n",
"updateTime": "2024-12-17 15:44:42\n",
"status": "DOING",
"deleted": false,
"dstProjectName": "mms_test",
"dstName": "default"
}
],
"pageSize": 10,
"pageNum": 1
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.