GetMmsJob

Updated at:

Retrieves the details of a single MMA migration plan.

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

get

*project

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

None None

Request syntax

GET /api/v1/mms/datasources/{sourceId}/jobs/{jobId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

sourceId

integer

Yes

The data source ID.

2000015

jobId

integer

Yes

The job ID.

10

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Response elements

Element

Type

Description

Example

object

ApiRes

requestId

string

The request ID.

D9F872FD-5DDE-30A6-8C8A-1B8C6A81059F

data

object

The migration job object.

id

integer

The migration job ID.

10

name

string

The migration job name.

migrate_db_1

sourceId

integer

The data source ID.

2

dbId

integer

The source database ID.

23

sourceName

string

The data source name.

demo

srcDbName

string

The source database name.

mms_test

srcSchemaName

string

The source schema name in a three-level namespace.

default

dstDbName

string

The destination MaxCompute project.

mms_target

dstSchemaName

string

The destination MaxCompute schema.

default

status

string

The migration task status.

Valid values:

  • INIT :

    Not running.

  • DONE :

    Succeeded.

  • DOING :

    Running.

  • FAILED :

    Failed.

DOING

type

string

The migration scope. Valid values: Database, Tables, Partitions.

Valid values:

  • Partitions :

    Multiple partitions.

  • Database :

    Single database.

  • Tables :

    Multiple tables.

Tables

taskNum

integer

The number of migration tasks included.

100

stopped

boolean

Indicates whether the job is stopped.

false

createTime

string

The creation time in the format of YYYY-MM-DD HH:mm:ss.

2024-12-17 15:44:17

taskDone

integer

The number of completed migration tasks.

100

config

object

The configuration of the migration job.

partitions

array

The list of partition IDs of the tables to migrate. This parameter takes effect when type is set to Partitions.

integer

The partition ID of the table to migrate.

[123, 132]

tables

array

The list of table names to migrate. This parameter takes effect when type is set to Tables.

string

The name of the table to migrate.

["student", "scores"]

taskType

string

[Deprecated] Valid values: MOCK, HIVE (hive udtf task), HIVE_DATAX (hive datax task), COPY_TASK (ODPS Copy Task), ODPS_INSERT_OVERWRITE (ODPS simple insert overwrite task), MC2MC_VERIFY, OSS, HIVE_OSS, HIVE_SPARK, BIGQUERY.

BIGQUERY

tableBlackList

array

The list of tables to exclude from migration. This parameter takes effect when type is set to Database.

string

The table to exclude from migration. This parameter takes effect when type is set to Database.

["student", "scores"]

tableWhiteList

array

The list of tables to migrate. This parameter takes effect when type is set to Database. If tableWhiteList is not specified, all tables in the corresponding database are migrated.

string

The table to migrate. This parameter takes effect when type is set to Database.

["student", "scores"]

partitionFilters

object

The partition filter expressions. Specifies the partition filter expression for a given table.

string

The partition filter expression. Example: p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde'). Description:

p1, p2, and p3 are partition names.

Partition values can only be strings or numbers. Strings must be enclosed in double or single quotes.

Except for partition columns of the INT and BIGINT types, partition values of other types can only be strings.

Comparison operators include: >, >=, =, <, <=, and <>.

The partition filter expression supports the IN operator.

Logical operators include: AND and OR.

Parentheses are supported.

{ "student": "p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde')" }

schemaOnly

boolean

Depcreated

false

tableMapping

object

The mapping from source table names to destination table names.

string

The mapping from source table names to destination table names.

{'a': 'a1'}

increment

boolean

Specifies whether to enable incremental migration. Only new partitions or modified partitions are migrated. Modified partitions are re-migrated.

true

enableVerification

boolean

Specifies whether to enable verification. The current verification method executes SELECT COUNT on both the source and destination to compare row counts.

true

tunnelQuota

string

Depcreated

Depcreated

columnMapping

object

The column name mapping in the format of {source column name: destination column name}.

string

The column name mapping in the format of {source column name: destination column name}.

{"c-1": "c_1"}

others

object

The additional configuration information.

{"spark.executor.mem": "2g"}

eta

string

The expected migration completion time. A smaller eta value indicates a higher priority for the migration task.

2025-05-06

Examples

Success response

JSON format

{
  "requestId": "D9F872FD-5DDE-30A6-8C8A-1B8C6A81059F",
  "data": {
    "id": 10,
    "name": "migrate_db_1",
    "sourceId": 2,
    "dbId": 23,
    "sourceName": "demo",
    "srcDbName": "mms_test",
    "srcSchemaName": "default",
    "dstDbName": "mms_target",
    "dstSchemaName": "default",
    "status": "DOING",
    "type": "Tables",
    "taskNum": 100,
    "stopped": true,
    "createTime": "2024-12-17 15:44:17",
    "taskDone": 100,
    "config": {
      "partitions": [
        0
      ],
      "tables": [
        "[\"student\", \"scores\"]"
      ],
      "taskType": "BIGQUERY",
      "tableBlackList": [
        "[\"student\", \"scores\"]"
      ],
      "tableWhiteList": [
        "[\"student\", \"scores\"]"
      ],
      "partitionFilters": {
        "key": "{\n\"student\": \"p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde')\" \n}\n"
      },
      "schemaOnly": false,
      "tableMapping": {
        "key": "{'a': 'a1'}"
      },
      "increment": true,
      "enableVerification": true,
      "tunnelQuota": "Depcreated",
      "columnMapping": {
        "key": "{\"c-1\": \"c_1\"}"
      },
      "others": {
        "spark.executor.mem": "2g"
      }
    },
    "eta": "2025-05-06"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.