This topic describes how to use MaxCompute Migration Service (MMS) to migrate a data source to MaxCompute.
Migration job types
MMS supports three types of migration jobs: full database migration, partial migration of multiple tables, and partial migration of multiple partitions.
Full database migration: Migrates a single database.
Partial migration (multiple tables): Migrates one or more tables.
Partial migration (multiple partitions): Migrates one or more partitions.
Procedure
Before you create a migration job, make sure that you have configured a data source.
Log on to the MaxCompute console and select the destination region in the upper-left corner.
In the navigation pane on the left, choose .
On the Data Source tab, click the
icon to the left of the destination data source to expand the list of databases.In the Operation column of the destination database, click Full Migration or Partial Migration, and then configure the parameters.
If you click Partial Migration, you are redirected to the destination database page. On the Table List and Partition List tabs, select the tables or partitions to migrate, and then click Create Migration Job.
Parameter
Required
Description
Database Name
Yes
The default value is the name of the database to be migrated.
Job Name
Yes
The name of the job.
Data Source
Yes
The default value is the name of the current data source.
Source Database
Yes
The default value is the name of the database to be migrated.
Destination MaxCompute Project
Yes
Select the name of the destination MaxCompute project.
NoteIf the data source is BigQuery, the destination MaxCompute project must support Schema.
Destination Schema
Yes
Select a schema in the destination MaxCompute project. For more information about schemas, see Schema operations.
NoteThis parameter is available only for projects for which Schema is enabled.
Table Blacklists And Whitelists
No
Select Whitelist or Blacklist. The options are described as follows:
Whitelist: The names of the tables to be migrated. Separate multiple table names with commas (,).
NoteIf you select Partial migration (multiple tables) as the migration type, the tables you selected are added to the whitelist.
If you perform a full database migration, the whitelist is empty by default.
Blacklist: The names of the tables that you do not want to migrate. Separate multiple table names with commas (,).
You do not need to configure this parameter if you select Partial migration (multiple partitions) as the migration type.
ETA
No
Select the expected completion time for the job. MMS sorts jobs by priority based on this time.
Enable Verification
No
If you enable this feature, MMS runs the
SELECT COUNT(*)statement on the partitions of the source and destination to obtain the number of rows. MMS then verifies whether the data is successfully migrated based on the number of rows.Incremental Migration
No
If you enable this feature, new tasks will skip partitions that have been successfully migrated.
Migrate Table Schema Only
No
Creates only the schemas of the corresponding tables and partitions in MaxCompute. Data is not migrated.
Partition Filter
No
An expression to filter partitions. Example:
p1 >= '2022-03-04' and (p2 = 10 or p3 > 20) and p4 in ('abc', 'cde'). The following list describes the expression:p1, p2, and p3 are partition names.
Partition values can be strings or numbers. Strings must be enclosed in double quotation marks ("") or single quotation marks ('').
For partition key columns of types other than INT and BIGINT, the partition values can only be strings.
The following comparison operators are supported:
>, >=, =, <, <=, and <>.The partition filter expression supports the
INoperator.The following logical operators are supported:
ANDandOR.Parentheses are supported.
Table Name Mapping
No
The name of the table after it is migrated to the destination MaxCompute project.
Field Name Mapping
No
The name of the column after it is migrated to MaxCompute.
Other Configurations
No
The mapping for the TableType. This configuration item is in JSON format. Example:
{ "mc.table.type": { "dataset1.table1":{"table.type":"delta","pk":["id1"]}, "dataset2.table2":{"table.type":"delta","pk":["id1","id2"]}, "dataset2.table2":{"table.type":"transactional"} } }.Click Submit to create the migration job.
After the job is created, you can view its status on the Migration Job tab. If the migration job fails:
You can click Details in the Actions column of the migration job to open the Migration Task List page. Then, click Log in the Actions column of the task to view the reason for the failure.
Click Retry in the Operation column of the migration job to run it again.
NoteData migration involves three stages: schema migration, data migration, and data verification. If a task in the migration job fails and you click Retry, the task restarts from the data migration stage.