Creates a data migration task.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
odps:CreateMmsJob | create | *project
| None | None |
Request syntax
POST /api/v1/mms/datasources/{sourceId}/jobs HTTP/1.1Request 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:
| |
| 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.