All Products
Search
Document Center

MaxCompute:CreateMmsJob

Last Updated:Sep 30, 2025

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

Request parameters

Parameter

Type

Required

Description

Example

sourceId

integer

Yes

The ID of the data source.

body

object

No

The request body.

sourceId

integer

No

The ID of the data source.

name

string

No

The name of the migration job.

sourceName

string

No

The name of the data source.

srcDbName

string

No

The name of the source database.

srcSchemaName

string

No

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

dstDbName

string

No

The destination MaxCompute project.

dstSchemaName

string

No

The destination MaxCompute schema.

taskType

string

No

The type of the migration task.

Valid values:

  • HIVE :

    HIVE

  • BIGQUERY :

    BIGQUERY

partitions

array

No

The list of partition IDs.

integer

No

The value of the partition ID.

tables

array

No

The list of table names.

string

No

The table name.

tableBlackList

array

No

The blacklist of tables.

string

No

The table name.

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.

partitionFilters

object

No

The partition filter expressions. The format is `{Table name: Partition filter expression}`.

string

No

The partition filter expression.

schemaOnly

boolean

No

Specifies whether to migrate only metadata.

tableMapping

object

No

The table mappings. The format is `{Source table: Destination table}`.

string

No

The table name.

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.

enableSchemaMigration

boolean

No

enableDataMigration

boolean

No

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.

columnMapping

object

No

The column mappings. The format is `{Source column name: Destination column name}`.

string

No

The column name.

others

object

No

Other configuration information.

any

No

The configuration value.

eta

string

No

Response elements

Element

Type

Description

Example

object

ApiRes

requestId

string

The request ID.

data

object

The returned data.

asyncTaskId

integer

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

Examples

Success response

JSON format

{
  "requestId": "",
  "data": {
    "asyncTaskId": 0
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.