All Products
Search
Document Center

MaxCompute:GetMmsTable

Last Updated:Sep 30, 2025

Retrieves a table 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:GetMmsTable

get

*project

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

None

None

Request syntax

GET /api/v1/mms/datasources/{sourceId}/tables/{tableId} HTTP/1.1

Request 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:

  • PART_DONE :

    Partially migrated.

  • INIT :

    Not migrated.

  • DONE :

    Migrated.

  • DOING :

    Migrating.

  • FAILED :

    Migration failed.

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.