Skip to contentManaged Kafka is live: Apache Kafka on AWS for half the cost of MSK
Back to the Data Almanac

RoundupUpdated

CDC to Data Lake: 7 Tools Compared on Iceberg, Deletes and Upkeep

Shipment 81734 is one of 300M rows in a shipments table on Aurora MySQL 8.0. It changes status six times in a day: created, picked, packed, in transit, out for delivery, delivered. Then a support agent cancels a duplicate and deletes the row. Ask Athena about it an hour later and, depending on the CDC tool you picked, you get one row, no rows or seven.

Artie, Debezium, Flink CDC, OLake, Estuary, Fivetran and AWS DMS all move change data capture streams into a lake. Two things split them: what lands in the lake, and who runs compaction afterwards. We'll follow shipments into an Iceberg table in Amazon S3 Tables, queried from Athena.

Artie is a fully managed real-time streaming platform that continuously replicates data from production databases into warehouses and lakes.

What lands in the lake: change files, a merged table or a history

Log-based CDC tools read the same thing: the MySQL binlog or the Postgres write-ahead log. What differs is the shape they write. Here is shipment 81734 after its six versions and the delete, in each shape.

ShapeWhat lands for shipment 81734Who merges
Change filesSeven Parquet rows, each with an operation flagYou, with a Spark or SQL job
Merged tableOne row, updated in place, then removed or flaggedThe CDC tool
Change historySeven rows, one per changeNobody; it's append-only

Now run SELECT * FROM shipments WHERE id = 81734 in Athena. The answer depends on the shape and on how the tool applies deletes:

Change files are Parquet (or CSV) files in S3, one row per change, with a column that says insert, update or delete. They're cheap to write and keep everything. But a query sees every version of every row, so someone writes a merge job that folds them into current state. The bronze and silver layers in the usual lakehouse diagram are this shape plus that job.

A merged table is an Iceberg or Delta Lake table where the tool applies each change by primary key. Iceberg records each batch as a new snapshot (we cover how Iceberg commits a snapshot separately). Athena returns one row per shipment. A hard delete removes 81734; a soft delete keeps the row and sets a flag, so your queries have to filter it out. A merged table is what a data lakehouse query engine reads for current state.

A change history keeps every change as its own row with the operation and source timestamp. It answers "what was the status at 14:00?" and feeds a history table or SCD Type 2 from CDC.

The upkeep after the write: merge order, small files and snapshots

A table that takes a commit every few seconds or minutes needs work that a nightly batch table doesn't.

Merge by log position, not arrival time. Every change carries its place in the source log. In Debezium's events that's the binlog file and pos for MySQL and the lsn for Postgres. A retried batch or a late event must lose to a newer position, or the "in transit" version of shipment 81734 can overwrite "delivered". Sivabalan Narayanan makes the same point on the Apache Hudi blog in What is CDC on a Data Lake?: "Merging by the source log position, rather than arrival time, makes the pipeline immune to this."

Updates and deletes either rewrite files or add delete files. Iceberg's write.update.mode, write.delete.mode and write.merge.mode all default to copy-on-write: each change rewrites the data files that hold the affected rows. Merge-on-read writes small delete files instead (position deletes or equality deletes in format v2, deletion vectors in v3) and leaves the cost to readers until compaction. The Hudi post calls merge-on-read "generally the recommended table type for update-heavy CDC ingestion", and a shipments row that changes six times a day is that workload.

Streaming into a lake table leaves four jobs, and a change-file pipeline adds your own merge job on top:

JobWhy streaming makes it worseDefault on S3 Tables
CompactionSmall files pile upOn, 512 MB files
Snapshot expirySnapshots and metadata growOn, 120 hours, keep 1
Orphan-file cleanupRetries leave stray filesOn, 3 + 10 days
Snapshot-to-log alignmentFirst load overlaps live changesNone; the CDC tool's job

On S3 Tables, AWS runs the first three by default: compaction and snapshot expiry per table, and unreferenced-file removal per table bucket. Snapshot expiry stops for a table if a writer sets Iceberg retention properties or tags on it. On a self-managed Iceberg catalog, you schedule Iceberg's rewrite_data_files, expire_snapshots and remove_orphan_files procedures yourself. On Delta Lake, it's OPTIMIZE and VACUUM.

S3 Tables' maintenance and Iceberg's procedures don't cover the last row. The first copy of all 300M rows is a long read, and orders keep shipping while it runs. The tool has to start reading the binlog before the copy and apply those changes after it, in order. And the binlog has to still exist when it does. A stalled consumer on Postgres is worse: the slot holds WAL on the source's disk, which we describe in what a stalled consumer does to the source.

7 CDC tools for data lakes, compared

We read each vendor's own docs on December 1, 2026. If your lake is half warehouse, our CDC tools for cloud data warehouses roundup covers that side.

ToolLands asFormatsUpkeep left to youRun by
ArtieMerged table, change files or historyIceberg, Delta Lake, ParquetTurn on Delta and REST upkeep; orphan files on RESTArtie, cloud or BYOC
DebeziumAppended change rows by defaultIcebergKafka or Debezium Server, all table upkeepYou
Flink CDCKeyed tableIceberg, Paimon, HudiFlink cluster, all table upkeepYou
OLakeKeyed tableIcebergCompaction and expiry through OLake FusionYou (open source)
EstuaryKeyed table, soft deletes by defaultIcebergEMR app and catalog; upkeep off by defaultEstuary, with your EMR
FivetranKeyed tableIceberg, optional Delta metadataCompaction isn't documentedFivetran
AWS DMSChange filesCSV or ParquetMerge, compaction, expiryAWS, your tasks

1. Artie

Artie reads the binlog with its own reader, buffers changes in Kafka and writes them to the lake. It lands all three shapes: a merged table in Iceberg (S3 Tables or a REST catalog) or Delta Lake on S3, change files in S3 or GCS, and a __history table per source table with history mode.

Within each flush, events are deduplicated per key and applied as keyed writes, and the Kafka offset is committed only after the write succeeds. A replayed batch converges on the same table, which gives exactly-once delivery for primary-keyed, current-state tables. Iceberg v2 writes run as Spark SQL jobs we submit through Apache Livy; v3 tables, in early access, use a native engine. On S3 Tables, AWS handles compaction, snapshot expiry and unreferenced files. On a REST catalog, Artie can compact small files and expire snapshots once a day. Those jobs are off until you turn them on (ask us if your workspace doesn't show them), and orphan-file cleanup is yours.

For shipments, Athena shows one row for 81734 and, with hard deletes (the default), nothing after the delete. Deletes are hard or soft (an __artie_delete flag) for the pipeline, and can be skipped per table, though Delta Lake, S3 and GCS have no soft-delete option. S3 Tables pipelines write Iceberg v2, since Athena can't read v3. A new column, like carrier_code in the trial below, appears with the next row change, since the ALTER alone sends nothing to the lake. The 300M-row backfill runs alongside CDC: new changes queue in Kafka and apply in order when it finishes. CDC latency is sub-minute, and Iceberg commits follow your flush rules.

The limits: Iceberg and Delta Lake are destinations on the Enterprise plan; S3 and GCS change files are on every plan, and pricing starts free up to 1M billable rows a month, then Growth from $500 a month billed annually. There's no Hudi or Paimon destination. Transformations are per-column and per-table controls, such as include or exclude, hash, encrypt, skip deletes and, on Postgres sources, skip no-op updates. A rename arrives as a new column and the old one stops getting values; a type change isn't applied to the destination column. Both show up in the schema-change email. History mode is at-least-once. Delta compaction is off until you turn it on; with it on, Artie also vacuums files the Delta log stopped referencing more than 7 days ago.

2. Debezium

Debezium is an open-source CDC project. It writes change events to Kafka through Kafka Connect, or to other sinks through Debezium Server. Neither path ends in a merged Iceberg table without settings you choose.

The Debezium Server sink for Apache Iceberg "is a community-maintained, open-source project". Its docs set upsert to false by default, so each change is appended: Athena returns seven rows for 81734. Turn upsert on and upsert-keep-deletes is true by default, so the deleted shipment stays with __deleted set to true until you change it.

On Kafka Connect, Apache Iceberg's Kafka Connect sink lists no upsert setting in its configuration; CDC goes through an experimental DebeziumTransform. Debezium's own delete.tombstone.handling.mode=rewrite adds __deleted: true to a flattened record. Either way, you run Kafka or Debezium Server, the merge logic and every upkeep job. Pick it when other services already consume the same change events. Our Debezium alternatives post covers what that costs to run.

3. Flink CDC

Flink CDC (3.7.0) runs capture and write as one Flink job, with pipeline sinks for Iceberg, Paimon and Hudi. It fits teams that already run Flink, or want Paimon or Hudi rather than Iceberg.

Two lines in the Iceberg sink's docs matter for shipments: "The source table must have a primary key" and "Exactly-once semantics are not supported." A table without a key can't use it. The sink is at-least-once and relies on the primary key for idempotent writes, so a replay converges on keyed tables. Compaction, snapshot expiry and the Flink cluster are yours.

4. OLake

OLake is open source (Apache-2.0) and writes database changes straight into Iceberg on your own storage. Since 0.11.0 you choose the delete format: equality deletes, positional deletes (both Iceberg v2) or deletion vectors (v3).

Athena only operates on Iceberg v2 tables. Write deletion vectors and the deleted shipment is gone in engines that read v3, but the table won't open in Athena. Compaction, snapshot expiry and orphan-file cleanup live in a separate repo, OLake Fusion, which you deploy and run alongside OLake.

5. Estuary

Estuary's Iceberg materialization needs two things on your side: an Iceberg REST catalog and an AWS EMR Serverless application with the Spark runtime, which runs the merges.

The same page lists hard deletes as "Disabled by default (soft-delete)". Out of the box, shipment 81734 stays in the table with _meta/op set to d, so every Athena query has to filter it out, or you turn hard deletes on. Estuary runs capture and the pipeline; the catalog and the EMR application stay in your account. Compaction and snapshot expiry are off by default. On a Glue catalog, the connector can turn on Glue table optimizers; on other catalogs, you run the jobs.

6. Fivetran

Fivetran lands lake tables through its Managed Data Lake Service. It always writes Iceberg metadata and can also write Delta Lake metadata for the same files, which helps when Athena and Databricks both read the table.

Fivetran expires snapshots, keeping at least the last two, and moves orphan files to an orphans folder inside the table directory on the second and fourth Saturday of each month, deleting them on the next run. The docs don't mention compaction, and they state that "Fivetran does not support position deletes for Iceberg tables." Deletes also count toward monthly active rows, so a shipment deleted this month counts toward MAR even if nothing else changed it.

7. AWS DMS

AWS DMS writes change files. Its S3 target writes CSV or Parquet (DataFormat), and in each CDC record "the first field … contains the letter I (INSERT), U (UPDATE), or D (DELETE)". CdcInsertsOnly and CdcInsertsAndUpdates narrow what's written, and TimestampColumnName adds a commit timestamp. DMS has no Iceberg or S3 Tables target.

So shipment 81734 arrives as seven records, the last starting with D, and the merge into Iceberg is a Glue or Spark job you write and run.

How to trial a tool against your own table

Point the tool at a test copy of shipments and run this against the source:

SQL
INSERT INTO shipments (id, status) VALUES (81734, 'created');
UPDATE shipments SET status = 'picked'           WHERE id = 81734;
UPDATE shipments SET status = 'packed'           WHERE id = 81734;
UPDATE shipments SET status = 'in_transit'       WHERE id = 81734;
UPDATE shipments SET status = 'out_for_delivery' WHERE id = 81734;
UPDATE shipments SET status = 'delivered'        WHERE id = 81734;
DELETE FROM shipments WHERE id = 81734;
ALTER TABLE shipments ADD COLUMN carrier_code varchar(8);
INSERT INTO shipments (id, status, carrier_code)
  VALUES (81735, 'created', 'UPS');

Leave longer than the tool's flush interval between statements. Artie, for one, keeps only the latest change per key in each flush, S3 change files included, so seven quick changes can land as one row.

Then run three queries in Athena (engine version 3):

  1. SELECT id, count(*) FROM shipments GROUP BY id HAVING count(*) > 1 returns nothing on a merged table. Rows here mean change files or appends.
  2. SELECT * FROM shipments WHERE id = 81734 should come back empty. One row with a delete flag means soft deletes are on; several rows mean change files or a history.
  3. SELECT carrier_code FROM shipments WHERE id = 81735 should return UPS. It fails if schema changes wait for you. The insert after the ALTER matters, because some tools, Artie included, add a column only when a row change arrives.

After an hour of normal traffic, count the table's files with Athena's $files metadata table:

SQL
SELECT content,
       count(*) AS files,
       round(avg(file_size_in_bytes) / 1048576.0, 1) AS avg_mb
FROM "logistics"."shipments$files"
GROUP BY content;

In the Iceberg spec, content 0 is data files, 1 is position deletes and 2 is equality deletes. Thousands of files of a few MB each, or delete files piling up, mean compaction isn't keeping pace.

When you don't need a lake for this

If every consumer queries from Snowflake, BigQuery or Databricks SQL and nobody needs the open files, CDC straight into the warehouse has fewer moving parts. The merged table and its upkeep live inside the warehouse. Our CDC tools for cloud data warehouses roundup covers that path.

A lake earns its upkeep when several engines read one copy, or when you keep every version of every row for audits.

To see what Artie lands for your own table, run the trial on a free pipeline writing S3 change files, or talk to us about Iceberg and Delta Lake on Enterprise. In our benchmark against AWS DMS on Postgres, Artie's slot held 1/16 the WAL after ten minutes at 22,400 events a second.

FAQ

What are the best CDC tools for streaming database changes to data lakes?

Artie, Debezium, Flink CDC, OLake, Estuary, Fivetran and AWS DMS. The right one depends on whether you want a merged Iceberg or Delta table, or change files you merge yourself, and on who runs compaction. See the comparison table.

Is log-based CDC better than query or trigger-based CDC for a data lake?

Yes, when the lake needs deletes and change order. It reads the binlog or WAL instead of querying tables, sees deletes that a query can't, and gives each change a log position to merge by.

How do you handle deletes in CDC to a data lake?

Apply them as row-level deletes in the table format, keep the row with a soft-delete flag, or keep the delete as a row in a change history. Change-file pipelines need a merge job before a delete removes anything.

How do you deal with out-of-order CDC events in a data lake?

Merge by the source log position (binlog file and position, or the Postgres LSN), never by arrival time, so a late or replayed event can't overwrite a newer one.

Should CDC land in Iceberg, Delta Lake or raw Parquet?

Iceberg or Delta Lake when people query current state, because updates and deletes apply in the table. Raw Parquet when you want every change and will run the merge yourself. If Athena reads the table, keep Iceberg tables on format v2.

Watch your data replicate live