ClickHouse is a column-oriented database management system (DBMS) for online analytical processing (OLAP). Compared with traditional analytical databases, ClickHouse provides faster aggregate queries on large and wide tables. This topic describes how to synchronize data from an ApsaraDB RDS for MySQL instance to a ClickHouse cluster by using Data Transmission Service (DTS). You can also follow the procedure to configure data synchronization tasks for user-created MySQL databases. The data synchronization feature allows you to transfer and analyze data with high efficiency.
Prerequisites
- The tables to be synchronized from the source database contain primary keys.
- The destination ClickHouse cluster is created. For more information, see Create a cluster.
- Purchase a data synchronization instance. For more information, see Purchase a DTS instance.
Note On the buy page, set Source Instance to MySQL, set Target Instance to ClickHouse, and set Synchronization Topology to One-Way Synchronization.
Precautions
- In this scenario, DTS cannot synchronize data definition language (DDL) operations.
- 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.
- A maximum of 256 databases can be synchronized to the ClickHouse cluster.
- The names of the databases, tables, and columns to be synchronized must comply with the naming conventions of ClickHouse. For more information, see Limits.
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 ClickHouse 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 the 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.
DTS can synchronize the following SQL operations during incremental data migration: Data manipulation language (DML) operations: INSERT and UPDATE Warning The data consistency between the source and destination databases is not guaranteed
because DTS cannot synchronize the DELETE operations.
|