All Products
Search
Document Center

MaxCompute:GetMmsDb

Last Updated:Sep 30, 2025

Retrieves a database from a MaxCompute Migration Assist (MMA) data source.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

odps:GetMmsDb

get

*project

acs:odps:{#regionId}:{#accountId}:mmsdatasource/{#sourceId}

None None

Request syntax

GET /api/v1/mms/datasources/{sourceId}/dbs/{dbId} HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

sourceId

integer

Yes

The ID of the data source.

2000017

dbId

integer

Yes

The database ID.

1232

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 the JSON format.

{}

tables

integer

The number of tables.

200

tablesDoing

integer

The tables that are being migrated.

20

tablesDone

integer

The number of tables whose migration is complete.

120

tablesPartDone

integer

The number of tables whose migration is partially complete.

20

tablesFailed

integer

The number of tables whose migration failed.

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 number of partitions whose migration failed.

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:

  • PART_DONE :

    The migration is partially complete.

  • INIT :

    The migration has not started.

  • DONE :

    The migration is complete.

  • DOING :

    The migration is in progress.

  • FAILED :

    The migration failed.

DOING

dstName

string

default

dstProjectName

string

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.