All Products
Search
Document Center

Import data from MyCat DRDS

Last Updated: Aug 15, 2020

This topic descibs how to import data from MyCat to Distributed Relational Database Service (DRDS).

Procedure

Assessment recommendations

During assessment recommendations, your MyCat configuration files can be analyzed, and the partitioning algorithms in MyCAT are converted to the corresponding partitioning algorithms in DRDS. In addition, the DRDS and ApsaraDB RDS for MySQL instance specifications that you may require are estimated based on the expected business growth data that you submit. After the assessment, you can obtain a file that contains recommended DRDS and ApsaraDB RDS for MySQL instance specifications , and DDL statements that can be executed on DRDS instances.

  1. Log in to DRDS console.

  2. In the left navigation pane, click Evaluation import > Assessment recommendations.

  3. Click Start MyCat assessment in the upper-right corner.

  4. In the MyCat information step, you need to upload related MyCat configuration files (the configuration files contain schema.xml, rule.xml, server.xml files, all of which will be used for the assessment and the generation of DDL statements) and enter the information of peak business data, after that, click Next.

  5. In the Task Preview step, click Start to start the assessment process. Then you can return to the Assessment recommendations task list check the assessment report.

    Make sure that the database address in your server.xml file can access the Internet. Otherwise, the task precheck may fail.

Data import

You can start data import process by using the assessment report or clicking MyCat custom import on the Import tasks page. Then, your MyCat data is automatically imported into DRDS.

  • In the current version, you must create a DRDS instance and the corresponding databases in advance (you can create a DRDS instance with the specifications that are recommended in the assessment report).
  • If you start the import based on the assessment report, you do not need to create tables and the import process will automatically create tables for you.
  • If the DDL statements in the report do not meet your requirements, you can create your own tables as required, and start the process by using the custom import.

Start the import process based on the assessment report

  1. Log in to DRDS console.

  2. In the left navigation pane, click Evaluation import > Assessment recommendations.

  3. Find the target task from the Assessment recommendations task list and click Start Importing in the Actions column to go to the Start Import Task page.

    The entire process consists of five stages. You only need to perform operations as prompted. The Topology Validation tab displays the topology relationship between the DRDS database and the corresponding database shards on ApsaraDB RDS for MySQL instances.

Start the import process through custom import

  1. Log in to DRDS console.

  2. In the left navigation pane, click Evaluation import > Data import

  3. Click MyCat custom import in the upper-right corner.

    When you use the custom import, you need to create corresponding tables in the DRDS database.

  4. In the SOURCE database and target database step, you need to upload MyCat files (schema.xml and rule.xml) in the SOURCE database information section. In the Target database information section, you need to configure the target DRDS instance and the corresponding database you have created, and then click Next.

  5. In the Migration list step, configure the source MyCat tables and the corresponding target tables in DRDS, and then click Next.
  6. In the Task preview step, click Start importing task.

View the import progress

You can view the import task that you just created in the import task list. If you want to check the import progress of the task, you can click Import Details in the Actions column.
The Migration Task Details page displays your source and target database information, as well the details of the four main stages (Database Building, Building Tables, Full Migration, and Incremental Migration)

  • Database Building: DRDS automatically creates a database when you generate an import task based on an assessment report.

    This stage is not available for custom import.

  • Building Tables: DRDS automatically creates the corresponding tables when you generate an import task based on an assessment report.

    This stage is not available for custom import.

  • Full Migration: The MyCat import task migrates your historical data at this stage.

  • Incremental Migration: The MyCat import task migrates your current incremental data after the historical data is migrated.