This topic describes how to use OceanBase Migration Service (OMS) Community Edition to migrate data from a Doris database to OceanBase Database Community Edition.
Limitations
Limitations on the source database
Do not perform DDL operations that change the database or table schema during full migration. Otherwise, the data migration task may be interrupted.
At present, only full migration is supported for data migration tasks from a Doris database to OceanBase Database Community Edition.
OMS Community Edition supports Doris Database V1.x and later.
Data source identifiers and user accounts must be globally unique in OMS Community Edition.
OMS Community Edition supports migrating databases, tables, and columns with ASCII-compliant names that do not contain special characters (spaces, line breaks, or |"'`()=;/&).
We recommend that you migrate no more than 1,000 tables in one migration task to avoid affecting the running of the data migration task.
Considerations
After you set the time zone of a Doris database to +08:00, an error invalid format: Fixed/UTC+08:00:00 may be returned when you query some system tables. OMS Community Edition sets set time_zone = '+08:00' when it generates component configurations, and then queries the system tables to check whether the error is returned. If no error is returned, the default value of source.timezone is +08:00. If the error is returned, the default value of source.timezone is Asia/Shanghai.
Data type mapping
| Doris Database | OceanBase Database Community Edition |
|---|---|
| BOOLEAN | BOOLEAN |
| TINYINT | TINYINT |
| SMALLINT | SMALLINT |
| INT | INT |
| BIGINT | BIGINT |
| LARGEINT | BIGINT UNSIGNED |
| FLOAT | FLOAT |
| DOUBLE | DOUBLE |
| DECIMAL | DECIMAL |
| DATE | DATE |
| DATETIME | DATETIME |
| CHAR | CHAR |
| VARCHAR | VARCHAR |
| STRING | VARCHAR |
| ARRAY | ARRAY |
| MAP | VARCHAR |
| STRUCT | JSON |
| JSON | JSON |
| VARIANT | JSON |
| BITMAP | STRING Use the bitmap_to_string function to read data from a Doris database and convert it to a string, and then write the string to OceanBase Database Community Edition. |
| HLL | BIGINT Use the hll_cardinality function to read data from a Doris database and convert it to an integer, and then write the integer to OceanBase Database Community Edition. |
Procedure
Create a data migration task.
Log in to the console of OMS Community Edition.
In the left-side navigation pane, click Data Migration.
On the Data Migration page, click Create Task in the upper-right corner.
On the Select Source and Target page, configure the parameters.
Parameter Description Migration Task Name We recommend that you use a combination of Chinese characters, digits, and letters. The name must not contain spaces and must be no longer than 64 characters. Tag Click the text box and select a tag from the drop-down list. You can also click Manage Tags to create, modify, or delete tags. For more information, see Manage data migration tasks by using tags. Source If you have created a Doris data source, select it from the drop-down list. If not, click New Data Source in the drop-down list and create a data source in the dialog box that appears. For more information, see Create a Doris data source. Target If you have created an OceanBase Database Community Edition data source, select it from the drop-down list. If not, click New Data Source in the drop-down list and create a data source in the dialog box that appears. For more information, see Create an OceanBase Database Community Edition data source. Click Next.
On the Select Migration Type page, select Full Migration.
After a full migration task is started, OMS Community Edition migrates the existing data in the source database to the corresponding tables in the target database.
Click Next. On the Select Migration Objects page, select the migration object and migration scope.
You can select the migration object from Specify Objects and Match Rules. This topic describes how to select the migration object from Specify Objects. For more information about how to configure the matching rules, see Configure matching rules for migration objects.
Notice
The name of the table to be migrated and the names of the columns in the table must not contain Chinese characters.
If the database name or table name contains the "$$" character, the creation of a data migration task will fail.
In the Select Migration Objects section, select Specify Objects.
In the Specify Migration Scope section, select the objects to be migrated from the Source Object(s) list.
Click > to add the selected objects to the Target Object(s) list.
When you migrate data from a Doris database to OceanBase Database Community Edition, OMS Community Edition allows you to import the data by using text, rename the objects, and remove one or all migration objects.
Operation Procedure Import objects - In the right-side list of the Specify Migration Scope section, click Import Objects in the upper-right corner.
- In the dialog box that appears, click OK.
Notice:
Importing objects will overwrite previous selections. Proceed with caution. - In the Import Migration Objects dialog box, import the objects to be migrated.
You can import a CSV file to perform operations such as renaming a database or table. For more information, see Download and import migration object settings. - Click Validate.
- After the validity check is passed, click OK.
Rename OMS Community Edition allows you to rename migration objects. For more information, see Rename a database or table. Remove/Remove All OMS Community Edition allows you to remove a single or multiple objects temporarily selected to the target end during data mapping. - Remove a single migration object
In the right-side list of the Specify Migration Scope section, hover the pointer over the target object and click Remove. - Remove all migration objects
In the right-side list of the Specify Migration Scope section, click Remove All in the upper-right corner. In the dialog box that appears, click OK.
Click Next. On the Migration Type page, configure the parameters.
If you want to view or modify the parameters of the full migration component, click Configuration Details in the upper-right corner of the Full Migration section. For more information about the parameters, see the Component Parameters module.
Notice
The following parameters are displayed only if you select Full Migration on the Select Migration Type page.
Parameter Description Concurrency Speed Valid values: Stable, Normal, Fast, and Custom. The amount of resources to be consumed by a full migration task varies based on the migration performance. If you select Custom, you can set Read Concurrency, Write Concurrency, and JVM Memory as needed. Processing Strategy When Records Exist in Target Object Valid values: Ignore and Stop Migration. - If you select Ignore, when the data to be inserted conflicts with the existing data of a target table, OMS Community Edition retains the existing data and records the conflict data.
Notice
If you select Ignore, data is pulled in IN mode for full verification. In this case, the scenario where the target contains more data than the source cannot be verified, and the verification efficiency will be decreased.
- If you select Stop Migration and a target table contains data, an error is returned during full migration, indicating that the migration is not allowed. In this case, you must clear the data in the target table before you can continue with the migration.
Notice
After an error is returned, if you click Resume in the dialog box, OMS Community Edition ignores this error and continues to migrate data. Proceed with caution.
Writing Method Valid values: SQL (specifies to write data to tables by using INSERTorREPLACE) and Direct Load (specifies to write data through direct load). At present, you cannot write vector data by using direct load.- If you select Ignore, when the data to be inserted conflicts with the existing data of a target table, OMS Community Edition retains the existing data and records the conflict data.
Click Precheck. The system performs a precheck on the data migration task.
In the Precheck step, OMS Community Edition checks whether the network connection between the databases meets the requirements. You can start a data migration task only after all precheck tasks are completed. If an error is returned during the precheck:
You can troubleshoot and resolve the issue, and then perform the precheck again until the precheck is successful.
You can also click Skip in the Actions column of the error item. A dialog box pops up to prompt you of the impact of skipping the operation. After you confirm that you want to skip the operation, click OK.
Click Start Task. If you do not want to start the task, click Save. The system displays the details page of the data migration task. You can manually start the task as needed.
OMS Community Edition allows you to modify the migration objects during the execution of a data migration task. For more information, see View and modify migration objects. After a data migration task is initiated, the system executes the migration task based on the selected migration type. For more information, see the "View migration details" section in View details of a data migration task.