Under the Hood: Building MySQL Change Data Capture in ClickPipes
ClickPipes captures MySQL changes by streaming the ROW-format binary log after an initial consistent snapshot, tracking progress through either GTID sets or binlog file/position checkpoints. The source needs binlog_format=ROW and binlog_row_image=FULL so updates can be replayed idempotently. Schema changes are handled by parsing DDL with TiDB's SQL parser, and MySQL types are mapped to ClickHouse types, for example ENUM to LowCardinality(String) and VECTOR to Array(Float32). GTID mode survives failover, but position-based tracking requires resyncing the pipe. Column drops and renames, table renames and TRUNCATE are not propagated, and the target is tens of thousands of changes per second at under 30s latency.
Related posts
- MySQL CDC connector for ClickPipes is now Generally Available
ClickHouse easyNovice
ClickPipes' MySQL CDC connector, which replicates MySQL and MariaDB into ClickHouse Cloud, is generally available after moving over 1PB for hundreds of customers. Snapshots now run in parallel by default, with the partition key detected automatically from the primary key (including string and UUID types). In benchmarks this cut a 1TB snapshot from over a day to about an hour on 32 workers. New pipes require GTID-based replication, which survives failover unlike binlog file/offset positions, and at least 72 hours of binlog retention to avoid forced full resyncs. Also new are CPU, memory, network and source/destination lag metrics, Terraform and OpenAPI management, and volume-based billing starting September 1, 2026.
- Streamkap: An out-of-the-box CDC solution for ClickHouse
ClickHouse mediumAdept
Streamkap's ClickHouse connector streams change data capture from PostgreSQL, MySQL, SQL Server, Oracle and MongoDB into ClickHouse using Kafka, Debezium and Flink. It maps Kafka Connect types, including nested structs and arrays, to ClickHouse types such as Tuple and Array, and adds metadata columns like op type, source timestamp and delete flag to every row. Append mode writes every change to MergeTree tables, while the default upsert mode uses ReplacingMergeTree keyed on the event timestamp and a delete flag, so queries need FINAL to get deduplicated results. The post also covers handling inconsistent semi-structured source data and choosing between blocking and incremental snapshots for the initial load.
- Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 1
ClickHouse mediumAdept
Postgres-to-ClickHouse CDC can be built by streaming row changes from Postgres logical decoding (pgoutput plugin, replication slots, LSN ordering) through Debezium and Kafka, then applying them in ClickHouse with the ReplacingMergeTree engine. Updates and deletes become immutable inserts carrying a version column and a deleted flag, and background merges collapse duplicates. Correct results before a merge require FINAL at query time. Consumers must tolerate duplicate events after restarts, and deleted rows are only purged when clean_deleted_rows is set to Always, a setting with a known bug as of 23.5. The post also compares pull-based and push-based CDC and explains why a Kafka queue protects the Postgres WAL from growing when ClickHouse is unavailable.
- How Spyne simplified their CDC pipeline with ClickPipes and ClickHouse Cloud
ClickHouse mediumAdept
Spyne replaced a self-managed Debezium → Kafka → ClickHouse Kafka-engine/materialized-view CDC pipeline with ClickPipes on ClickHouse Cloud. The move eliminated 1–1.5 hours of manual work per table onboarding and fixed schema drift, where new source columns were silently dropped by DDL-locked materialized views. It also brought tradeoffs: snapshotting a new table pauses the whole pipe, so critical tables were isolated into dedicated pipes. ReplacingMergeTree's eventual consistency required adding FINAL to queries at extra CPU cost, and binlog loss forces full table resyncs instead of targeted partial ones.
- Postgres CDC in ClickHouse, A year in review
ClickHouse mediumAdept
A year after PeerDB's acquisition, Postgres CDC into ClickHouse via ClickPipes has grown to 400+ companies replicating over 200 TB per month, driven by real-time customer-facing analytics and data warehousing workloads. Key engineering changes include keeping logical replication connections open, because reconnects re-read WAL from restart_lsn and spiked lag. CTID block-based partitioning cut initial-load partition generation from 7+ hours to under a second, and 50+ pre-flight checks plus bucketed user-facing alerts cut on-call load by orders of magnitude. The biggest remaining gap is data modeling overhead from ReplacingMergeTree's asynchronous deduplication, which ClickHouse plans to address with lightweight UPDATEs and unique indexes.