Tablestore is a multi-model data storage service that is developed by Alibaba Cloud. Tablestore can store large volumes of structured data by using multiple models, and supports fast data query and analytics. This topic describes how to synchronize data from an ApsaraDB RDS for MySQL instance to a Tablestore instance by using Data Transmission Service (DTS). You can also follow the procedure to synchronize data from a self-managed MySQL database to a Tablestore instance. The data synchronization feature allows you to transfer and analyze data with ease.
Prerequisites
Precautions
- During initial full data synchronization, DTS consumes the read and write resources of the source and destination databases. This may increase the loads of the database servers. Before you synchronize data, evaluate the impact of data synchronization on the performance of the source and destination databases. We recommend that you synchronize data during off-peak hours.
- DTS does not synchronize data definition language (DDL) operations. If a DDL operation is performed on a table in the source database during data synchronization, you must perform the following steps: Remove the table from the selected objects, remove the table from the Tablestore instance, and then add the table to the selected objects again. For more information see Remove an object from a data synchronization task and Add an object to a data synchronization task.
- You can synchronize at most 64 tables to the Tablestore instance. If you need to synchronize more than 64 tables to the Tablestore instance, submit a ticket to raise the limit.
- The names of the tables and columns to be synchronized must comply with the naming
conventions of the Tablestore instance.
- The name of a table or an index can contain letters, digits, and underscores (_). The name must start with a letter or underscore (_).
- The name of a table or an index must be 1 to 255 characters in length.
Initial synchronization types
Initial synchronization type | Description |
---|---|
Initial schema synchronization | DTS synchronizes the schemas of tables from the source database to the destination
database.
Warning MySQL and Tablestore are heterogeneous databases. DTS does not ensure that the schemas
of the source and destination databases are consistent after initial schema synchronization.
We recommend that you evaluate the impact of data type conversion on your business.
For more information, see Data type mappings for schema synchronization.
|
Initial full data synchronization | DTS synchronizes historical data of tables from the source database to the destination database. Historical data is the basis for subsequent incremental data synchronization. |
Initial incremental data synchronization | DTS synchronizes incremental data from the source database to the destination database
in real time.
The following SQL operations can be synchronized during initial incremental data synchronization: INSERT, UPDATE, and DELETE. Warning We recommend that you do not execute DDL statements in the source database. Otherwise,
data synchronization may fail.
|