GUIDE
Change Data Capture streams every INSERT, UPDATE, and DELETE from your database in real-time. Learn how CDC works, why it beats dual writes, which databases support it, and how to build CDC pipelines with RisingWave.
Why CDC
Polling wastes resources by repeatedly querying for changes. Triggers add latency and couple change detection to the source database. Dual writes create consistency risks when one write succeeds and the other fails. Log-based CDC avoids all three problems: it is efficient, decoupled, and guarantees that every committed change is captured exactly once.
| Approach | Latency | Source Impact | Consistency | Captures Deletes |
|---|---|---|---|---|
| Polling | Seconds to minutes | High (repeated queries) | Eventual (may miss changes) | No |
| Triggers | Low | High (runs in transaction) | Strong (same transaction) | Yes |
| Dual Writes | Low | Medium (extra write) | Weak (partial failure risk) | Yes |
| Log-based CDC | Sub-second | Minimal (reads WAL) | Strong (commit order) | Yes |
How It Works
RisingWave supports direct CDC ingestion from PostgreSQL, MySQL, and MongoDB without requiring Kafka or Debezium as intermediaries. You create a source with a single SQL statement specifying the connection details, and RisingWave begins reading the database's change log immediately. Materialized views then transform the CDC stream using standard SQL.
Connect to PostgreSQL's logical replication slot directly. No Debezium, no Kafka Connect, no connector infrastructure to manage.
Read MySQL's binlog natively. RisingWave acts as a replication replica, receiving changes with minimal latency and overhead.
Stream changes from MongoDB change streams directly into RisingWave for real-time transformations on document data.
Also supports Debezium JSON, Canal, and Maxwell formats from Kafka for teams with existing connector infrastructure.
Getting Started
Change Data Capture (CDC) is a technique that identifies and captures every change made to data in a database — every INSERT, UPDATE, and DELETE — and delivers those changes as a real-time stream of events. Log-based CDC reads from the database's internal transaction log (WAL in PostgreSQL, binlog in MySQL), capturing changes without modifying application code or impacting query performance.
Start streaming database changes with SQL in minutes.
Start Building CDC Pipelines