{"id":21120,"date":"2026-11-30T13:28:40","date_gmt":"2026-11-30T13:28:40","guid":{"rendered":"https:\/\/greyson.eu\/?post_type=glossary&#038;p=21120"},"modified":"2026-11-30T13:28:40","modified_gmt":"2026-11-30T13:28:40","slug":"change-data-capture-cdc","status":"publish","type":"glossary","link":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/","title":{"rendered":"Change Data Capture (CDC)"},"content":{"rendered":"<h1>Change Data Capture (CDC): The Definitive Guide for Enterprise Data Teams<\/h1>\n<p><strong>Change data capture (CDC)<\/strong> is the discipline of detecting every insert, update and delete that happens inside a source system, turning those changes into an ordered stream of events, and delivering them to downstream systems so that analytics, applications and AI models operate on current data rather than on last night&#8217;s snapshot. It is the mechanism that converts a transactional database \u2014 a system designed to be written to, not read from in bulk \u2014 into a continuous, low-latency feed of business activity.<\/p>\n<blockquote><p><strong>Definition:<\/strong> Change data capture (CDC) is a set of software design patterns that identify and track the deltas \u2014 the changes \u2014 made to data in a source system, and propagate those deltas to one or more target systems in near real time, without re-reading the entire dataset.<\/p><\/blockquote>\n<p>For a CTO or data architect, the practical significance is narrower and more useful than the definition suggests. CDC is an architectural decision about <em>where truth lives and how fast it travels<\/em>. Every organisation running an ERP, a CRM, a core banking platform or a transactional web application already has a database that holds the authoritative version of its operational reality. The recurring problem is that this reality is invisible to everything else: the warehouse lags by hours, the search index is stale, the recommendation model trains on last week&#8217;s behaviour, and the migration project needs a maintenance window measured in days.<\/p>\n<h2>What Is Change Data Capture (CDC)?<\/h2>\n<p>At its core, CDC answers a deceptively simple question: <em>what changed since the last time I looked?<\/em> Traditional extraction answers a different question \u2014 <em>what does the whole table look like right now?<\/em> \u2014 and pays for the answer with a full scan of every row, every time. On a table with fifty million rows and a daily change rate of 0.3 percent, that means reading 49,850,000 rows to learn something about 150,000. CDC inverts the economics: it reads only the evidence of change, which the database has usually already written down for its own recovery purposes.<\/p>\n<h3>The delta-driven dataset<\/h3>\n<p>The output of a CDC process is what the literature calls a <strong>delta-driven dataset<\/strong>: a sequence of change records, each carrying an operation type (insert, update, delete), the affected row&#8217;s key, the before-and-after values where the source supports it, a commit timestamp, and a position in the source&#8217;s log. Consumed in order, these records let any target reconstruct the source&#8217;s state at any point in time \u2014 not just the current state, which is why CDC is so closely tied to auditability and historical analysis.<\/p>\n<h3>What CDC is not<\/h3>\n<p>Three clarifications prevent most architectural misunderstandings before they start:<\/p>\n<ul>\n<li><strong>CDC is not a database feature you switch on and forget.<\/strong> Some engines ship native CDC (SQL Server, Oracle, PostgreSQL via logical decoding), but a production pipeline still requires transport, schema handling, monitoring, replay and access control.<\/li>\n<li><strong>CDC is not replication.<\/strong> Physical replication copies storage blocks or log records to keep an identical standby. CDC decodes changes into a logical, consumable format that heterogeneous targets \u2014 a warehouse, a search engine, a cache, a message bus \u2014 can each apply in their own way.<\/li>\n<li><strong>CDC is not transformation.<\/strong> A CDC stream is a record of what happened, not a curated model. Cleaning, conforming, deduplicating and historising happen downstream, which is precisely the separation that makes CDC reusable across many consumers.<\/li>\n<\/ul>\n<h2>Where Did Change Data Capture Come From?<\/h2>\n<p>The term emerged from data warehousing practice in the late 1990s and early 2000s, when dimensional modelling made the refresh problem acute. Ralph Kimball&#8217;s warehouse methodology assumed periodic loads, and the industry&#8217;s first answer was the full extract \u2014 simple, auditable, and increasingly untenable as source systems grew. The first generation of CDC techniques was therefore entirely application-level: a <code>LAST_UPDATE<\/code> timestamp column, a version counter, or a status flag that marked a row as dirty. These techniques are still in use and still reasonable for small, low-velocity systems; they are also the origin of the misconception that CDC is a lightweight pattern.<\/p>\n<h3>The native feature era<\/h3>\n<p>The turning point was the realisation that databases already keep a complete, ordered, immutable record of every committed change \u2014 the transaction log. Oracle exposed it through LogMiner in the mid-1990s and later through GoldenGate, acquired in 2009. Microsoft shipped native CDC in SQL Server 2008, writing captured changes into system change tables with metadata such as operation type and commit LSN. IBM&#8217;s and DB2&#8217;s equivalents followed. Each vendor solved the problem inside its own engine, and the result was a fragmented toolscape in which every database required its own capture mechanism and its own operational runbook.<\/p>\n<h3>The log-decoding and streaming era<\/h3>\n<p>Two developments industrialised CDC. First, PostgreSQL&#8217;s logical decoding (from 9.4) and MySQL&#8217;s row-based binary log made open, well-documented change streams available on the most widely deployed open-source databases. Second, Debezium \u2014 open-sourced by Red Hat in 2016 and built on Kafka Connect \u2014 provided a single, connector-based abstraction that turned those streams into Kafka topics with a consistent envelope format. Since then, CDC has migrated from a warehouse-loading trick to a foundational primitive of event-driven architecture, and every major cloud vendor now sells it as a managed service: AWS Database Migration Service, Google Cloud Datastream, Azure SQL Database CDC feeding Fabric Eventstream, and comparable offerings from Snowflake and Databricks.<\/p>\n<h2>How Does Change Data Capture Work?<\/h2>\n<p>A CDC pipeline is a chain of five responsibilities: capture, serialise, transport, apply and govern. The sophistication of modern tooling hides the chain, but every failure mode an operations team will encounter lives in exactly one of those links \u2014 which is why understanding the mechanics matters more than memorising product names.<\/p>\n<h3>The transaction log as the source of truth<\/h3>\n<p>Before a database modifies a table, it writes the change to a write-ahead structure so that it can recover from a crash and roll back uncommitted work. That structure has a different name in every engine but the same semantics: PostgreSQL&#8217;s <strong>write-ahead log (WAL)<\/strong>, MySQL&#8217;s <strong>binary log (binlog)<\/strong>, Oracle&#8217;s <strong>redo log<\/strong>, SQL Server&#8217;s <strong>transaction log<\/strong>. CDC tools read this structure rather than querying the tables, which is why log-based capture adds almost no read load to production. The log is append-only and totally ordered, so the resulting stream preserves the exact commit order of the source \u2014 a property no polling mechanism can offer.<\/p>\n<p>Reading the log is not trivial. Entries are stored in a physical format optimised for recovery, not for consumption, and many engines record only buffer differences rather than full row images. Decoding therefore requires engine-specific logic, handling of uncommitted transactions that were later rolled back, coordination with log archiving so that entries are not purged before they are read, and tolerance for physical format changes between minor versions.<\/p>\n<h3>Snapshot and catch-up<\/h3>\n<p>A log contains history, but rarely all of it \u2014 retention windows are finite, and replaying years of entries is impractical. The standard production pattern is therefore two-phase:<\/p>\n<ol>\n<li><strong>Seed.<\/strong> Take a consistent snapshot of the source at a known point in time and bulk-load it into the target.<\/li>\n<li><strong>Catch up.<\/strong> Start streaming changes from the exact log position recorded when the snapshot was taken, so that no change is lost in the gap between the two phases.<\/li>\n<\/ol>\n<p>Getting this right is the single most common source of initial-load defects. If the snapshot is taken at 10:00 but the stream starts at 10:04, four minutes of writes vanish silently; if it starts at 09:56, rows are applied twice. Tooling that manages the snapshot and the stream offset as one atomic operation \u2014 rather than as two loosely coupled jobs \u2014 is worth paying for.<\/p>\n<h3>Positioning, log sequence numbers and recovery<\/h3>\n<p>Every CDC consumer must remember where it stopped. Engines expose this as a monotonic position: SQL Server&#8217;s <strong>log sequence number (LSN)<\/strong>, MySQL&#8217;s binlog coordinates or GTID, PostgreSQL&#8217;s LSN together with a replication slot, Kafka&#8217;s partition offset once the stream is in a broker. This bookmark does three jobs: it lets a stream start at an arbitrary historical point, it lets a failed process restart from the last successfully applied change, and it lets a consumer rewind deliberately to backfill a new target. Combined with idempotent apply logic, the position is what makes &#8220;effectively exactly-once&#8221; achievable on top of an at-least-once transport.<\/p>\n<h3>The four components of a CDC pipeline<\/h3>\n<table>\n<thead>\n<tr>\n<th>Component<\/th>\n<th>Responsibility<\/th>\n<th>Typical technology<\/th>\n<th>What goes wrong here<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Source connector<\/td>\n<td>Reads and decodes the transaction log or change table; assigns schema<\/td>\n<td>Debezium connectors, GoldenGate Extract, native CDC capture jobs<\/td>\n<td>Insufficient privileges, log retention shorter than outage window<\/td>\n<\/tr>\n<tr>\n<td>Change event stream<\/td>\n<td>Durable, ordered, replayable transport from source to consumers<\/td>\n<td>Apache Kafka, Amazon Kinesis, Google Pub\/Sub, Azure Event Hubs<\/td>\n<td>Topic compaction misconfiguration, unbounded growth, hot partitions<\/td>\n<\/tr>\n<tr>\n<td>Schema registry<\/td>\n<td>Versioning and compatibility enforcement for evolving message schemas<\/td>\n<td>Confluent Schema Registry, Apicurio, AWS Glue Schema Registry<\/td>\n<td>Breaking changes published without compatibility mode<\/td>\n<\/tr>\n<tr>\n<td>Sink connector \/ consumer<\/td>\n<td>Applies changes to warehouses, lakehouses, search indexes, caches or services<\/td>\n<td>Kafka Connect sinks, dbt + MERGE, native warehouse ingestion<\/td>\n<td>Non-idempotent writes, out-of-order apply, duplicate rows<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>What Are the Main Change Data Capture Methods?<\/h2>\n<p>There are five families of technique, and the choice between them is determined less by preference than by what the source engine exposes and how much load the source can tolerate. Most mature estates end up using more than one.<\/p>\n<h3>Log-based CDC<\/h3>\n<p>The connector reads the database&#8217;s transaction log asynchronously and decodes committed changes. Impact on the source is minimal because no query touches the data pages; ordering is exact because the log is sequential; deletes are captured natively because they appear as log records; and no schema change is required. The costs are real but bounded: the CDC user needs elevated privileges (replication rights, or in some engines sysadmin-equivalent log-reading permissions), the pipeline is tied to engine internals that vendor upgrades can alter, and the log must be retained long enough to survive the longest plausible outage.<\/p>\n<h3>Trigger-based CDC<\/h3>\n<p>Database triggers fire on insert, update and delete and write the affected row into a shadow or audit table, which the CDC process then drains. This works on any engine with trigger support, requires no log access, and can embed bespoke business logic \u2014 which is why it survives in regulated environments where a specific audit record shape is mandated. The price is paid on the write path: every DML statement becomes two or more writes plus trigger execution inside the same transaction, increasing commit latency and lock duration. Triggers also create tight coupling between application schema and capture mechanism, and are easy to disable accidentally during a migration.<\/p>\n<h3>Query-based (timestamp or version) CDC<\/h3>\n<p>A scheduled query selects rows whose <code>last_updated<\/code> timestamp or version number exceeds the previous high-water mark. Nothing is installed in the database, no special privileges are needed, and the technique is legible to any developer. It also fails in ways that are easy to miss: hard deletes leave no trace and are invisible; a clock skew or a transaction committed with an earlier timestamp than the watermark silently drops rows; and the query still scans an index range on every poll, so the load scales with change volume rather than staying flat.<\/p>\n<h3>Snapshot-diff CDC<\/h3>\n<p>Two full snapshots are compared to compute the difference. This is the technique of last resort: it is expensive in I\/O and storage, and the compute cost grows with table size rather than change volume. It remains legitimate for sources that expose nothing better \u2014 a legacy system with no timestamps, no triggers and no log access \u2014 and for periodically reconciling a CDC pipeline against reality to catch drift.<\/p>\n<h3>Native change feeds and outbox patterns<\/h3>\n<p>Two hybrid approaches deserve separate mention. Some platforms expose a first-class change feed \u2014 DynamoDB Streams, Cosmos DB Change Feed, Salesforce Change Data Capture via Pub\/Sub API, SAP&#8217;s ODP or SLT extractors \u2014 which behaves like log-based CDC but through a vendor API. Separately, the <strong>transactional outbox<\/strong> pattern writes domain events into an outbox table inside the same transaction as the business change, and a CDC connector then publishes the outbox. This gives application teams guaranteed consistency between state and event without dual writes, and it is the most reliable way to get events out of a monolith you are not yet ready to decompose.<\/p>\n<table>\n<thead>\n<tr>\n<th>Method<\/th>\n<th>Detects changes via<\/th>\n<th>Impact on source<\/th>\n<th>Captures deletes<\/th>\n<th>Commit ordering<\/th>\n<th>Best fit<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Log-based<\/td>\n<td>Transaction log \/ WAL \/ binlog \/ redo log<\/td>\n<td>Very low (asynchronous read)<\/td>\n<td>Yes<\/td>\n<td>Exact<\/td>\n<td>High-volume OLTP, real-time pipelines, the default choice<\/td>\n<\/tr>\n<tr>\n<td>Trigger-based<\/td>\n<td>Database triggers writing to shadow tables<\/td>\n<td>Medium\u2013high (extra writes, locks)<\/td>\n<td>Yes<\/td>\n<td>Exact within transaction<\/td>\n<td>Engines without log access; mandated audit record formats<\/td>\n<\/tr>\n<tr>\n<td>Query \/ timestamp-based<\/td>\n<td>Polling on timestamp or version column<\/td>\n<td>Medium (repeated range scans)<\/td>\n<td>No (hard deletes invisible)<\/td>\n<td>Approximate<\/td>\n<td>Small or legacy systems, low change velocity<\/td>\n<\/tr>\n<tr>\n<td>Snapshot-diff<\/td>\n<td>Comparing two full snapshots<\/td>\n<td>Very high (full scans)<\/td>\n<td>Yes, by absence<\/td>\n<td>None (batch-level)<\/td>\n<td>Last-resort sources; periodic reconciliation of other pipelines<\/td>\n<\/tr>\n<tr>\n<td>Native change feed \/ outbox<\/td>\n<td>Vendor API or application-written outbox table<\/td>\n<td>Low\u2013medium<\/td>\n<td>Yes (via tombstone or delete event)<\/td>\n<td>Exact<\/td>\n<td>SaaS platforms, NoSQL stores, event-driven microservices<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How Does CDC Compare to ETL, Replication and SCD?<\/h2>\n<p>Four terms are routinely conflated in architecture discussions, and the confusion is expensive because each answers a different question. CDC is a <em>capture<\/em> mechanism, ETL is a <em>processing paradigm<\/em>, replication is a <em>copying<\/em> guarantee, and slowly changing dimensions are a <em>storage model<\/em>.<\/p>\n<h3>CDC versus batch ETL<\/h3>\n<p>Batch ETL moves data on a schedule: extract everything, transform it in a staging area, load it, repeat tomorrow. It is predictable, easy to reason about, and excellent for large historical backfills and heavy transformations. Its weaknesses are latency, load shape and redundant work. CDC moves only deltas continuously, so load is spread evenly instead of spiking at 02:00, and the target&#8217;s freshness is measured in seconds rather than hours. The two are complementary rather than competing: a typical modern architecture seeds with a bulk extract, then keeps the target current with CDC, and runs periodic batch reconciliations as a control.<\/p>\n<h3>CDC versus replication<\/h3>\n<p>Replication answers &#8220;keep this database identical to that one.&#8221; It is usually physical or engine-native, it preserves the whole database rather than a selected set of tables, and it offers no logical event format for other consumers. CDC answers &#8220;tell me what changed, in a form I can use,&#8221; which means selective table capture, decoded row images, a portable event envelope, and fan-out to many heterogeneous consumers. A read replica solves read scaling; it does not solve feeds into a warehouse, a search index, a cache and three microservices.<\/p>\n<h3>CDC versus SCD<\/h3>\n<p>This distinction trips up more delivery teams than any other. CDC operates on the <em>source<\/em> side and is responsible for transporting change efficiently. Slowly changing dimensions operate on the <em>target<\/em> side and decide how history is represented once the change arrives. SCD Type 1 overwrites the existing record \u2014 appropriate for correcting a misspelled name. SCD Type 2 closes the current version with an end timestamp and opens a new one, preserving a queryable timeline \u2014 appropriate for tracking a customer&#8217;s address, a product&#8217;s price or a contract&#8217;s terms. CDC supplies the events; the SCD strategy decides what the warehouse does with them. A pipeline can be technically flawless at the CDC layer and still fail an audit because nobody chose an SCD strategy for the dimensions it feeds.<\/p>\n<table>\n<thead>\n<tr>\n<th>Dimension<\/th>\n<th>Change data capture<\/th>\n<th>Batch ETL<\/th>\n<th>Replication<\/th>\n<th>SCD modelling<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Primary question answered<\/td>\n<td>What changed, and how do I deliver it?<\/td>\n<td>How do I reshape the whole dataset?<\/td>\n<td>How do I keep an identical copy?<\/td>\n<td>How do I store history in the target?<\/td>\n<\/tr>\n<tr>\n<td>Layer<\/td>\n<td>Source \/ ingestion<\/td>\n<td>Ingestion and transformation<\/td>\n<td>Storage \/ engine<\/td>\n<td>Target \/ data model<\/td>\n<\/tr>\n<tr>\n<td>Latency<\/td>\n<td>Seconds<\/td>\n<td>Hours (scheduled)<\/td>\n<td>Seconds<\/td>\n<td>Not applicable<\/td>\n<\/tr>\n<tr>\n<td>Load profile<\/td>\n<td>Continuous, flat<\/td>\n<td>Periodic spikes<\/td>\n<td>Continuous<\/td>\n<td>Not applicable<\/td>\n<\/tr>\n<tr>\n<td>Target flexibility<\/td>\n<td>Any consumable target<\/td>\n<td>Modelled warehouse<\/td>\n<td>Same engine, same schema<\/td>\n<td>Warehouse \/ lakehouse<\/td>\n<\/tr>\n<tr>\n<td>Typical owner<\/td>\n<td>Data engineering \/ platform<\/td>\n<td>Data engineering<\/td>\n<td>DBA \/ infrastructure<\/td>\n<td>Analytics engineering<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Why Does Change Data Capture Matter for the Business?<\/h2>\n<p>The business case for CDC is rarely &#8220;we want streaming.&#8221; It is usually one of four pressures, and being explicit about which one applies determines whether the programme succeeds.<\/p>\n<h3>Latency becomes a business variable<\/h3>\n<p>In fraud detection, inventory allocation, dynamic pricing or logistics routing, the value of a data point decays within seconds. A nightly warehouse load cannot support those decisions at all; a five-minute micro-batch can support some of them; CDC supports the rest. The relevant metric is not average latency but the tail \u2014 the 99th percentile freshness of the target, because that is what a decision-maker experiences during a peak.<\/p>\n<h3>Cost and load displacement<\/h3>\n<p>Full refreshes consume source I\/O, network bandwidth and target compute in proportion to table size, not to change volume. On a large estate, moving to incremental capture typically removes the majority of extraction load and a meaningful share of warehouse credits. The saving is real but must be netted against the new pipeline&#8217;s own infrastructure, licensing and operations cost \u2014 a comparison many business cases quietly omit.<\/p>\n<h3>Auditability and regulatory traceability<\/h3>\n<p>An ordered, replayable record of every change is exactly what auditors and regulators ask for. Under GDPR, being able to demonstrate who accessed or modified personal data, and when, is materially easier when change history is a by-product of the pipeline rather than a separately engineered feature. The same property underpins financial reporting controls and the integrity requirements of regulated industries.<\/p>\n<h3>Decoupling and organisational velocity<\/h3>\n<p>Without CDC, every new consumer of operational data requires either a bespoke integration or direct read access to the production database \u2014 both of which couple teams together and slow delivery. With CDC, the database publishes once and consumers subscribe independently: a new analytics product, a new search experience or a new AI feature can be added without touching the source application or negotiating with its owning team. That decoupling is often worth more than the latency improvement, because it changes the cost of every future initiative.<\/p>\n<h2>What Are the Most Common CDC Use Cases?<\/h2>\n<p>CDC earns its place through a small number of patterns that recur across industries. Recognising which pattern you are implementing determines the tooling, the SLA and the failure model.<\/p>\n<table>\n<thead>\n<tr>\n<th>Use case<\/th>\n<th>Pattern<\/th>\n<th>Typical latency target<\/th>\n<th>Critical design decision<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Real-time analytics and dashboards<\/td>\n<td>Source database \u2192 stream \u2192 warehouse or lakehouse<\/td>\n<td>10 s \u2013 2 min<\/td>\n<td>Merge strategy in the target; micro-batch versus continuous<\/td>\n<\/tr>\n<tr>\n<td>Zero-downtime database migration<\/td>\n<td>Snapshot \u2192 CDC catch-up \u2192 controlled cutover<\/td>\n<td>Seconds during cutover window<\/td>\n<td>Reconciliation and rollback plan before the switch<\/td>\n<\/tr>\n<tr>\n<td>Database-per-service decomposition<\/td>\n<td>Outbox table + CDC connector \u2192 event bus<\/td>\n<td>Sub-second<\/td>\n<td>Event schema ownership and versioning discipline<\/td>\n<\/tr>\n<tr>\n<td>Search index and cache synchronisation<\/td>\n<td>Source database \u2192 CDC \u2192 Elasticsearch \/ Redis<\/td>\n<td>1 \u2013 30 s<\/td>\n<td>Delete handling and full-rebuild capability<\/td>\n<\/tr>\n<tr>\n<td>AI\/ML feature pipelines<\/td>\n<td>Source database \u2192 CDC \u2192 feature store<\/td>\n<td>Minutes<\/td>\n<td>Point-in-time correctness to prevent training leakage<\/td>\n<\/tr>\n<tr>\n<td>Cross-system operational consistency<\/td>\n<td>ERP\/CRM \u2192 CDC \u2192 downstream operational systems<\/td>\n<td>Seconds \u2013 minutes<\/td>\n<td>Master data ownership and conflict resolution rules<\/td>\n<\/tr>\n<tr>\n<td>Audit trail and compliance evidence<\/td>\n<td>CDC \u2192 immutable append-only store<\/td>\n<td>Near real time<\/td>\n<td>Retention policy, PII minimisation, access controls<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Real-time analytics without rebuilding the application<\/h3>\n<p>The most common entry point is a warehouse or lakehouse that needs to be current. A retail platform captures order and inventory changes from its transactional database and merges them into a lakehouse table every thirty seconds; the merchandising dashboard stops reporting yesterday&#8217;s stock position. The application team changes nothing.<\/p>\n<h3>Zero-downtime migration<\/h3>\n<p>Migrations fail on the cutover, not on the copy. CDC changes the risk profile: seed the new platform, stream changes continuously, run both systems in parallel while reconciling row counts and checksums, then switch writes during a short controlled window with a rollback path that remains valid until confidence is established. For a core banking or ERP migration, this is the difference between a weekend outage and a planned fifteen-minute switch.<\/p>\n<h3>Event-driven microservices and the outbox pattern<\/h3>\n<p>When a monolith must publish domain events without rewriting its transaction boundaries, writing to an outbox table inside the business transaction and capturing that table with CDC gives atomicity for free: either the business change and the event both commit, or neither does. It eliminates the dual-write problem that otherwise produces orphaned events and inconsistent state.<\/p>\n<h3>Search, cache and personalisation sync<\/h3>\n<p>Elasticsearch indexes and Redis caches go stale the moment someone edits a record. CDC-driven invalidation replaces fragile TTL guesses with event-driven updates, and \u2014 critically \u2014 gives a reliable delete path, which polling-based sync almost never has.<\/p>\n<h3>AI and machine learning feature pipelines<\/h3>\n<p>Models are only as good as the freshness and correctness of their features. CDC feeds feature stores with current operational data and, when the stream retains history, supports point-in-time feature retrieval so that training data reflects what was known at prediction time rather than what is known now. That distinction is the difference between a model that generalises and one that quietly memorises the future.<\/p>\n<p>If your organisation is weighing which of these patterns applies to its own estate \u2014 or comparing a build-it-yourself Debezium pipeline against a managed service \u2014 the <a href=\"https:\/\/greyson.eu\/en\/data-capability\/\">Greyson data capability team<\/a> can help you assess the trade-offs against your existing architecture, team skills and compliance requirements.<\/p>\n<h2>What Are the Hardest CDC Challenges?<\/h2>\n<p>The first pipeline is easy. The second year is hard. Almost every difficulty in production traces back to one of six issues, and each has a known mitigation that is far cheaper to adopt upfront.<\/p>\n<table>\n<thead>\n<tr>\n<th>Challenge<\/th>\n<th>What it looks like in production<\/th>\n<th>Mitigation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Schema drift<\/td>\n<td>A source column is renamed or its type widened; the pipeline breaks or silently writes nulls<\/td>\n<td>Schema registry with backward-compatibility rules, automated DDL detection, contract tests in CI<\/td>\n<\/tr>\n<tr>\n<td>Ordering and duplicates<\/td>\n<td>Two updates to the same key arrive out of order, or a retry produces a duplicate row<\/td>\n<td>Sequence by commit LSN or timestamp; idempotent MERGE on primary key; deduplicate by latest sequence<\/td>\n<\/tr>\n<tr>\n<td>Delete handling<\/td>\n<td>Hard deletes vanish from the target, which then reports phantom revenue<\/td>\n<td>Prefer log-based capture; explicit tombstone events; soft-delete convention with scheduled purge<\/td>\n<\/tr>\n<tr>\n<td>Log retention and outages<\/td>\n<td>A pipeline is down longer than the source keeps its log; changes are unrecoverable<\/td>\n<td>Alert on offset lag; size retention against realistic outage duration; fall back to a targeted re-snapshot<\/td>\n<\/tr>\n<tr>\n<td>Security and PII exposure<\/td>\n<td>A raw change stream replicates personal data into several systems with different access models<\/td>\n<td>Column-level masking at capture, field-level encryption, purpose-based access control, GDPR data mapping<\/td>\n<\/tr>\n<tr>\n<td>Total cost of ownership<\/td>\n<td>Licence, compute, storage and specialist headcount exceed the batch jobs CDC replaced<\/td>\n<td>Build-vs-buy analysis including operations; scope capture to tables that actually need it; monitor unit economics<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Schema drift is a governance problem, not a tooling problem<\/h3>\n<p>Tools detect schema changes; they cannot decide whether a renamed column is a breaking change or a harmless evolution. That decision needs an owner. The workable pattern is a contract between producer and consumers: a registry enforcing backward compatibility, a CI check that fails a migration which would break a published schema, and a documented deprecation window. Teams that skip this step discover the cost months later, when a routine application release silently breaks four downstream consumers.<\/p>\n<h3>Ordering, duplicates and &#8220;effectively exactly-once&#8221;<\/h3>\n<p>Distributed transports generally guarantee at-least-once delivery, which means duplicates are normal and must be made harmless. Two mechanisms do the work: deterministic sequencing (using the source commit position, never the arrival time at the consumer), and idempotent application of changes (a MERGE keyed on primary key that overwrites with the record carrying the highest sequence). Combined, they yield exactly-once <em>effects<\/em> on the target without requiring exactly-once delivery. Chasing true exactly-once transport usually costs more than it saves.<\/p>\n<h3>Deletes, tombstones and the silent data quality failure<\/h3>\n<p>Polling-based capture cannot see hard deletes, so the target accumulates records the source has already discarded. The symptom is insidious: dashboards report active customers who churned months ago, and reconciliation finds a discrepancy that nobody can date. Log-based capture sees the delete record natively; for other sources, an explicit soft-delete convention with a purge job is the pragmatic answer, provided every consumer understands the convention.<\/p>\n<h3>Security, PII and the expanding blast radius<\/h3>\n<p>A change stream is a copy of your operational data moving across systems, and it multiplies exposure surfaces. In a GDPR context this is not only a technical concern but a documentation obligation: the data flow must be mapped, the legal basis for each destination established, and field-level controls applied at capture rather than left to each consumer. Column filtering, masking and tokenisation at the source connector are far cheaper than retrofitting governance onto eight downstream systems.<\/p>\n<h3>Total cost of ownership<\/h3>\n<p>CDC shifts cost rather than eliminating it. The capture infrastructure, stream retention, schema registry, monitoring and the specialist skills to run all of it are permanent line items. A programme that migrates forty tables to CDC when only six are genuinely latency-sensitive will have spent money to add operational risk. Scope deliberately.<\/p>\n<h2>Which CDC Tools and Platforms Are Used in Practice?<\/h2>\n<p>The market divides into four layers: open-source engines, commercial platforms, managed cloud services, and the warehouse-side ingestion features that increasingly absorb the sink responsibility. Most enterprises combine at least two layers.<\/p>\n<table>\n<thead>\n<tr>\n<th>Layer<\/th>\n<th>Representative options<\/th>\n<th>Strengths<\/th>\n<th>Trade-offs<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Open-source engine<\/td>\n<td>Debezium, Kafka Connect, Apache Flink CDC<\/td>\n<td>No licence cost, wide connector coverage, transparent behaviour<\/td>\n<td>You operate it; upgrades, monitoring and on-call are yours<\/td>\n<\/tr>\n<tr>\n<td>Commercial platform<\/td>\n<td>Oracle GoldenGate, Qlik Replicate, Fivetran, Airbyte Enterprise, Striim<\/td>\n<td>Heterogeneous coverage from a single control plane, vendor support, GUI operations<\/td>\n<td>Licensing often scales with data volume; connector quality varies<\/td>\n<\/tr>\n<tr>\n<td>Managed cloud service<\/td>\n<td>AWS DMS, Google Cloud Datastream, Azure SQL Database CDC \/ Fabric Eventstream<\/td>\n<td>Low operational overhead, native integration with the surrounding platform<\/td>\n<td>Ecosystem gravity; cross-cloud and on-prem sources can be second-class<\/td>\n<\/tr>\n<tr>\n<td>Warehouse-side ingestion<\/td>\n<td>Snowpipe Streaming, BigQuery Storage Write API, Databricks AUTO CDC, Delta Live Tables<\/td>\n<td>Simplifies the sink; declarative merge and sequencing<\/td>\n<td>Vendor lock-in at the modelling layer<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Build versus buy, honestly assessed<\/h3>\n<p>A Debezium-and-Kafka pipeline is genuinely production-grade and genuinely cheap on licence. What it is not is free: someone must own connector upgrades, offset management, schema registry operation, broker capacity planning, alerting and incident response. The buy decision is usually justified not by feature gaps but by the cost of a specialist team \u2014 which is precisely the constraint most mid-sized enterprises face. The worst outcome is a hybrid nobody owns: a managed service configured by a contractor, monitored by nobody, feeding a warehouse whose freshness nobody measures.<\/p>\n<h2>What Do IT Leaders Commonly Get Wrong About CDC?<\/h2>\n<p>Several beliefs are widespread enough to distort budgets before a single connector is configured.<\/p>\n<h3>&#8220;CDC is just a faster ETL job&#8221;<\/h3>\n<p>CDC changes the operating model, not only the schedule. A batch job fails and is rerun; a streaming pipeline degrades continuously and must be observed continuously. Freshness SLAs, lag alerting, replay procedures and ownership are new responsibilities that batch organisations do not already have in place.<\/p>\n<h3>&#8220;Turning on native CDC solves the problem&#8221;<\/h3>\n<p>Native features (SQL Server CDC, Oracle CDC, PostgreSQL logical decoding) solve capture. They do not solve transport, schema governance, target merge logic, deletes across heterogeneous consumers, monitoring or replay. Capture is roughly a third of the engineering.<\/p>\n<h3>&#8220;Log-based CDC has no impact on production&#8221;<\/h3>\n<p>It has minimal <em>read<\/em> impact, which is not the same as none. Log retention grows, replication slots on PostgreSQL can pin WAL and fill a disk if a consumer stalls, and long-running decode sessions compete for resources. Capacity planning is still required \u2014 the failure mode is just different.<\/p>\n<h3>&#8220;We can add governance later&#8221;<\/h3>\n<p>Retrofitting column-level masking onto a stream that already feeds eight systems is a cross-team remediation project. Doing it at the source connector takes an afternoon. The same asymmetry applies to schema contracts and retention policies.<\/p>\n<h3>&#8220;More real-time is always better&#8221;<\/h3>\n<p>Streaming adds cost, complexity and failure surface. A weekly finance report does not need sub-second freshness; a batch job that runs reliably at 03:00 may be the correct engineering answer. CDC should be applied where latency has measurable business value, and declined where it does not.<\/p>\n<h2>What Does the Future of CDC Look Like?<\/h2>\n<p>Three shifts are already visible and will shape architecture decisions over the next several years.<\/p>\n<h3>CDC as a platform primitive, not a project<\/h3>\n<p>Leading organisations are consolidating dozens of point-to-point integrations into a single governed change-data platform with self-service onboarding, standard event envelopes, central schema registry and per-domain ownership. The unit of delivery stops being &#8220;the pipeline&#8221; and becomes &#8220;the contract.&#8221;<\/p>\n<h3>Declarative sinks and open table formats<\/h3>\n<p>Lakehouse engines increasingly handle sequencing, deduplication and merge declaratively, and open table formats such as Delta Lake and Apache Iceberg provide ACID semantics and time travel over the same physical data. The practical consequence is that CDC&#8217;s complexity is migrating from hand-written merge logic into the platform \u2014 which raises the bar for the remaining work: governance, semantics and data contracts.<\/p>\n<h3>CDC as the feed layer for AI<\/h3>\n<p>Feature stores, retrieval-augmented systems and agentic applications all depend on current operational data. CDC is becoming the standard mechanism that keeps those systems supplied, and point-in-time correctness \u2014 the ability to reconstruct what the business knew at a specific moment \u2014 is becoming a first-class requirement rather than an analytics nicety. Expect more emphasis on lineage, quality signals carried alongside change events, and streaming data contracts that specify semantics, not just structure.<\/p>\n<h2>What Else Do IT Leaders Ask About Change Data Capture?<\/h2>\n<h3>What is change data capture in simple terms?<\/h3>\n<p>Change data capture is a way of watching a database and recording only what changes \u2014 new records, edits and deletions \u2014 so other systems can be updated immediately instead of reloading entire tables on a schedule.<\/p>\n<h3>How does change data capture work?<\/h3>\n<p>A CDC tool reads the database&#8217;s internal transaction log, or an equivalent change mechanism, decodes each committed change into an ordered event, sends it through a stream or messaging layer, and applies it to target systems. Log-based capture is the most common and least intrusive method.<\/p>\n<h3>What are the three main types of CDC?<\/h3>\n<p>Log-based CDC reads the transaction log; trigger-based CDC uses database triggers to write changes into shadow tables; query-based or timestamp-based CDC polls tables for rows modified after a stored watermark. Snapshot-diff and native change-feed approaches are further variants.<\/p>\n<h3>What is the difference between CDC and ETL?<\/h3>\n<p>ETL extracts and processes data in scheduled batches, so the target is only as fresh as the last run. CDC extracts only the changes continuously, so the target stays current with seconds of latency. The two are complementary: CDC for ongoing synchronisation, batch for backfills and heavy transformations.<\/p>\n<h3>Does CDC capture deletions?<\/h3>\n<p>Log-based and trigger-based CDC do, because deletes appear as log records or trigger events. Query-based timestamp CDC generally does not, which is why targets fed by polling frequently contain records the source has already removed.<\/p>\n<h3>Is CDC real-time or near real-time?<\/h3>\n<p>Near real-time is the accurate description. Latency typically ranges from well under a second to a few minutes depending on connector throughput, batching in the target, and how the sink applies changes. True hard real-time guarantees are rare and expensive.<\/p>\n<h3>When should you not use CDC?<\/h3>\n<p>Avoid CDC when data changes infrequently enough that a periodic full load is cheap, when the source exposes no reliable change mechanism, when the latency requirement is measured in hours, or when the team cannot commit to operating and monitoring a streaming pipeline. In those cases a well-run batch job is the better engineering decision.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change Data Capture (CDC): The Definitive Guide for Enterprise Data Teams Change data capture (CDC) is the discipline of detecting every insert, update and delete that happens inside a source system, turning those changes into an ordered stream of events, and delivering them to downstream systems so that analytics, applications and AI models operate on [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"parent":0,"template":"","glossary-cat":[],"class_list":["post-21120","glossary","type-glossary","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Change Data Capture (CDC) - Greyson<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Change Data Capture (CDC) - Greyson\" \/>\n<meta property=\"og:description\" content=\"Change Data Capture (CDC): The Definitive Guide for Enterprise Data Teams Change data capture (CDC) is the discipline of detecting every insert, update and delete that happens inside a source system, turning those changes into an ordered stream of events, and delivering them to downstream systems so that analytics, applications and AI models operate on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/\" \/>\n<meta property=\"og:site_name\" content=\"Greyson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"29 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/\",\"url\":\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/\",\"name\":\"Change Data Capture (CDC) - Greyson\",\"isPartOf\":{\"@id\":\"https:\/\/greyson.eu\/en\/#website\"},\"datePublished\":\"2026-11-30T13:28:40+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Domovsk\u00e1 str\u00e1nka\",\"item\":\"https:\/\/greyson.eu\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Glossary Terms\",\"item\":\"https:\/\/greyson.eu\/en\/glossary\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Change Data Capture (CDC)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greyson.eu\/en\/#website\",\"url\":\"https:\/\/greyson.eu\/en\/\",\"name\":\"Greyson\",\"description\":\"Let\u2019s make future GREYT together\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greyson.eu\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Change Data Capture (CDC) - Greyson","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/","og_locale":"en_US","og_type":"article","og_title":"Change Data Capture (CDC) - Greyson","og_description":"Change Data Capture (CDC): The Definitive Guide for Enterprise Data Teams Change data capture (CDC) is the discipline of detecting every insert, update and delete that happens inside a source system, turning those changes into an ordered stream of events, and delivering them to downstream systems so that analytics, applications and AI models operate on [&hellip;]","og_url":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/","og_site_name":"Greyson","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"29 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/","url":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/","name":"Change Data Capture (CDC) - Greyson","isPartOf":{"@id":"https:\/\/greyson.eu\/en\/#website"},"datePublished":"2026-11-30T13:28:40+00:00","breadcrumb":{"@id":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/greyson.eu\/en\/glossary\/change-data-capture-cdc\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Domovsk\u00e1 str\u00e1nka","item":"https:\/\/greyson.eu\/en\/"},{"@type":"ListItem","position":2,"name":"Glossary Terms","item":"https:\/\/greyson.eu\/en\/glossary\/"},{"@type":"ListItem","position":3,"name":"Change Data Capture (CDC)"}]},{"@type":"WebSite","@id":"https:\/\/greyson.eu\/en\/#website","url":"https:\/\/greyson.eu\/en\/","name":"Greyson","description":"Let\u2019s make future GREYT together","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greyson.eu\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"related_terms":"","external_url":"","internal_reference_id":"","_links":{"self":[{"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/glossary\/21120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/glossary"}],"about":[{"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/types\/glossary"}],"author":[{"embeddable":true,"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/users\/7"}],"version-history":[{"count":1,"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/glossary\/21120\/revisions"}],"predecessor-version":[{"id":21121,"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/glossary\/21120\/revisions\/21121"}],"wp:attachment":[{"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/media?parent=21120"}],"wp:term":[{"taxonomy":"glossary-cat","embeddable":true,"href":"https:\/\/greyson.eu\/en\/wp-json\/wp\/v2\/glossary-cat?post=21120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}