All Products
Search
Document Center

MaxCompute:CreateMmsJob

Last Updated:Feb 04, 2026

Creates a data migration task.

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

create

*project

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

None None

Request syntax

POST /api/v1/mms/datasources/{sourceId}/jobs HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

sourceId

integer

Yes

The ID of the data source.

2000014

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body parameters.

sourceId

integer

No

The ID of the data source.

2000014

name

string

No

The name of the migration job.

migrate_db_1

sourceName

string

No

The name of the data source.

demo

srcDbName

string

No

The name of the source database.

src_db

srcSchemaName

string

No

The name of the source schema. This is the schema in a Layer 3 namespace.

default

dstDbName

string

No

The destination MaxCompute project.

mms_test

dstSchemaName

string

No

The destination MaxCompute schema.

default

taskType

string

No

The type of the migration task.

Valid values:

  • HIVE :

    HIVE user-defined table-valued function (UDTF) method

  • BIGQUERY :

    BIGQUERY read API method

BIGQUERY

partitions

array

No

The list of partition IDs.

integer

No

The value of the partition ID.

1232

tables

array

No

The list of table names.

string

No

The table name.

t1

tableBlackList

array

No

The blacklist of tables.

string

No

The table name.

t1

tableWhiteList

array

No

The whitelist of tables. Note: If you configure both a whitelist and a blacklist, only the blacklist takes effect.

string

No

The table name.

t1

partitionFilters

object

No

{Table name: Partition filter expression}

string

No

The partition filter expression.

例子:p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde') 例子说明: 1. p1, p2, p3为分区名 2. 分区值只有字符串和数字两种,字符串被双引号或单引号包裹。除int/bigint类型的分区列值外,其他所有类型的分区值都只能取字符串值。 3. 比较操作符包括: >, >=, = , <, <=, <> 4. 支持"in"操作符 5. 逻辑操作符包括: and, or 6. 支持括号

schemaOnly

boolean

No

Specifies whether to migrate only metadata.

false

tableMapping

object

No

{Source table: Destination table}

string

No

The table name.

t1_1

increment

boolean

No

Specifies whether to perform an incremental migration. In an incremental migration, only new or changed partitions are migrated. Note that changed partitions are re-migrated.

true

enableSchemaMigration

boolean

No

Specifies whether to migrate table schemas.

true

enableDataMigration

boolean

No

Specifies whether to migrate table data.

true

enableVerification

boolean

No

Specifies whether to enable data verification. The current verification method is to execute SELECT COUNT(*) on the source and destination to compare the number of rows.

false

columnMapping

object

No

{Source column name: Destination column name}

string

No

The column name.

null

others

object

No

Other configuration information.

any

No

The configuration value.

null

eta

string

No

The expected completion time of the migration. Note: A smaller eta value gives the migration task higher priority.

2025-02-04

Response elements

Element

Type

Description

Example

object

ApiRes<asynctaskiddto>

requestId

string

The request ID.

73207140-0FD5-588A-B11A-3CE093924196

data

object

The returned data.

asyncTaskId

integer

The ID of the asynchronous task that is created for the migration job.

100

Examples

Success response

JSON format

{
  "requestId": "73207140-0FD5-588A-B11A-3CE093924196",
  "data": {
    "asyncTaskId": 100
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.