Tablestore is a multi-model data storage service that is developed by Alibaba Cloud. It can store a large amount of structured data and supports fast query and analysis. This topic describes how to synchronize data from a user-created MySQL database or an ApsaraDB RDS for MySQL instance to a Tablestore instance by using Data Transmission Service (DTS).
Prerequisites
Precautions
- DTS uses the read and write resources of the source and destination databases during initial full data synchronization. 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 required objects, remove the table from the Tablestore instance, and then add the table to the required objects. 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 remove the limit.
- The names of the tables or columns to be synchronized must comply with the naming
conventions of the Tablestore instance.
- The name of a table or index can contain letters, digits, and underscores (_). The name must start with a letter or underscore (_).
- The name of a table or 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 Do not execute DDL statements in the source database. Otherwise, data synchronization
may fail.
|
Before you begin
Notice When you configure the destination database, you must specify the AccessKey pair.
To protect the AccessKey pair of your Alibaba Cloud account, we recommend that you
grant permissions to a RAM user and create an AccessKey pair for the RAM user.