PolarDB PostgreSQL to ClickHouse Data Replication
This page describes how to replicate selected tables one way from Alibaba Cloud PolarDB for PostgreSQL to ClickHouse, including schema and full replication.
Before you begin
- Add the PolarDB for PostgreSQL source and ClickHouse target data sources to NineData. See Create a PolarDB for PostgreSQL data source and Create a ClickHouse data source.
- Make sure your account can access the selected source and target databases. Use the task pre-check results to identify the required privileges.
Procedure
- On the Data Replication page, create a one-way replication task and enter a name that helps identify it.
- Select the PolarDB PostgreSQL source in Source and the ClickHouse target in Target.
- Under Type, select Schema and Full. This procedure does not configure Incremental.
- Select the tables to replicate in the source object tree, then map each table to a target database and target table name. Before starting the task, confirm that the mappings point to the intended write destinations.
- After you finish the configuration, run Save and perform pre-check. If the pre-check fails, review the failed items, correct the configuration, and run the pre-check again.
- After the pre-check passes, start the task. Review the schema and full replication status and completed record count on the task details page.
caution
Full replication writes data to the target tables. Before starting the task, review the target data source, target database, target table names, and the handling strategies for same-name objects and existing data to confirm the intended write scope.