---
title: "Streamkap: An out-of-the-box CDC solution for ClickHouse"
description: "Streamkap's ClickHouse connector streams change data capture from PostgreSQL, MySQL, SQL Server, Oracle and MongoDB into ClickHouse using Kafka, Debezium and Flink."
url: "https://swe.quest/articles/streamkap-an-out-of-the-box-cdc-solution-for-clickhouse-fb75535a3b94ad24"
canonical: "https://clickhouse.com/blog/change-data-capture-solution-clickhouse-streamkap-cdc"
source: "ClickHouse"
published: "2024-02-22"
difficulty: "medium"
kind: "Case study"
reading_minutes: 14
tags: ["event-driven","analytics","data-pipelines","schema-migrations"]
---

# Streamkap: An out-of-the-box CDC solution for ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2024-02-22, 14 min read, Case study. Original: [https://clickhouse.com/blog/change-data-capture-solution-clickhouse-streamkap-cdc](https://clickhouse.com/blog/change-data-capture-solution-clickhouse-streamkap-cdc)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Schema migrations](https://swe.quest/tags/schema-migrations.md) (Data & databases)

## Prerequisites

- Change data capture concepts
- ClickHouse table engines ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- Kafka Connect basics ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

ClickHouse, Streamkap, Debezium, Kafka Connect, ReplacingMergeTree, Flink

## Related posts

- [Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 2](https://swe.quest/articles/change-data-capture-cdc-with-postgresql-and-clickhouse-part-2-2123f803752f2e9d.md): ClickHouse · 2023-06-15 · Medium · 22 min read · Event-driven architecture, PostgreSQL, Analytics & OLAP, Data pipelines, Replication
  A Postgres-to-ClickHouse CDC pipeline is built with Debezium, Kafka Connect and a ClickHouse materialized view, keeping a ReplacingMergeTree table in sync with the 28M-row UK property price dataset under a mix of inserts, updates and deletes.
- [Change Data Capture (CDC) with PostgreSQL and ClickHouse - Part 1](https://swe.quest/articles/change-data-capture-cdc-with-postgresql-and-clickhouse-part-1-10e3d601e2748dab.md): ClickHouse · 2023-06-15 · Medium · 23 min read · Event-driven architecture, PostgreSQL, Analytics & OLAP, Replication, Queues & messaging
  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.
- [Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse](https://swe.quest/articles/data-hive-the-story-of-beehiiv-s-journey-from-postgres-to-clickhouse-467867cb2bebb87b.md): ClickHouse · 2024-08-21 · Easy · 6 min read · Analytics & OLAP, Databases, PostgreSQL, Stream processing, Queues & messaging
  beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline.
- [98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse](https://swe.quest/articles/98-faster-queries-50-lower-cloud-costs-verihubs-journey-from-postgres-to-f6535061aff525b1.md): ClickHouse · 2026-07-06 · Medium · 6 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Event-driven architecture
  Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack.
- [TimescaleDB to ClickHouse replication: Use cases, features, and how we built it](https://swe.quest/articles/timescaledb-to-clickhouse-replication-use-cases-features-and-how-we-built-it-be36fccc04b0f111.md): ClickHouse · 2025-09-09 · Medium · 4 min read · PostgreSQL, Replication, Event-driven architecture, Analytics & OLAP
  ClickPipes' Postgres CDC connector, built on PeerDB, now replicates TimescaleDB hypertables into ClickHouse for one-time migrations, staged migrations, or running both databases side by side.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
