What Is the Best Way to Stream Kafka Topics into Iceberg Tables in 2026?
Three ingestion paths, plus the small-file and equality-delete maintenance every one of them leaves to you
The best way to stream Kafka topics into Iceberg in 2026 depends on one question: are your tables append-only or changelog? The Apache Iceberg Kafka Connect sink fits append-only topics with commit intervals measured in minutes. Flink fits lower latency and CDC upserts, at the price of running a stateful system. Managed, vendor-operated services trade money and lock-in for convenience. All three leave you with the same two chores afterwards: compacting small files and burning down equality deletes.
Key Takeaways
- •Pick the ingestion path by table shape: append-only topics suit the Kafka Connect sink, changelog and CDC topics suit Flink upserts, and managed services suit teams that will pay to avoid operating either.
- •Commit interval is the small-file dial: a 10-second interval produces 8,640 commits a day and a 60-second interval produces 1,440, according to a July 2026 streaming-to-Iceberg write-up.
- •Equality deletes defer work from write time to read time, so every unresolved delete taxes queries until maintenance folds it in.
- •No ingestion path replaces compaction, snapshot expiry and file-count monitoring; treat them as part of the pipeline, not as cleanup.
- •Track average file size, file count, commit lag and unresolved delete count as service health metrics from day one.
The three paths, and what each one hands you
A 2026 comparison of nine Kafka-to-Iceberg paths describes the Iceberg Kafka Connect sink as open source, mature and feature-rich, but notes a steep learning curve for teams not already running a Kafka Connect estate, and that it only handles data transport. That second point matters most: the sink moves records into tables and leaves table maintenance for you to build. If your topics are append-only events, such as clicks, orders or sensor readings, this is usually the least moving parts.
Flink is the other open-source path, and it is the standard choice when you need a near-real-time mirror of an operational database. The Iceberg Flink writes documentation says Iceberg supports UPSERT based on the primary key only for the v2 table format, and that commits happen after a successful Flink checkpoint. So your checkpoint interval is your commit interval, and your commit interval drives file counts. Flink is also a distributed stateful system that must be sized, checkpointed, upgraded and debugged.
The third path is a managed service operated by your streaming vendor. The same nine-path comparison calls the managed option turn-key, with schema mapping and compaction automated, but also describes it as significantly more expensive than the alternatives and prone to ecosystem lock-in. We treat that as one reviewer's opinion, and a fair one: if nobody on your team wants to run connectors or Flink jobs, paying for automation is a legitimate decision. Just price it against your topic volume before you commit.
How to choose: a decision rule
Start with the table, not the tool. If the Iceberg table only ever receives inserts, you can accept a commit interval of one to five minutes, and you already run Kafka Connect, use the sink. You avoid equality deletes entirely, and the write-up above notes that append-only pipelines do not have that problem. Your remaining work is compaction and snapshot expiry, which are predictable and schedulable.
If the table must mirror updates and deletes from a source database, you need upserts, and that means Flink or an equivalent changelog writer on a v2 table. Accept up front that you are signing up for equality-delete maintenance. Then decide freshness honestly. Many dashboards that ask for real-time are served perfectly well by a five-minute commit, and every halving of the interval roughly doubles the number of files you write.
If the team is small and the budget is not, a managed service removes the operational surface. Ask three questions before signing: where does the data physically live, can you read the tables from other engines without the vendor, and what does the bill look like at your peak topic throughput? Iceberg is an open table format, so portability is possible, but only if you verify it before you depend on it.
Why small files appear, and how to stop them
Every commit writes files sized by whatever arrived since the last commit. The July 2026 write-up puts the arithmetic plainly: a ten-second interval means 8,640 commits a day, a 60-second Spark trigger means 1,440. At a few thousand events per second, each of those commits produces tiny files. The author calls small files the number one operational failure mode in streaming lakehouse deployments.
The failure is gradual, which is what makes it dangerous. The first week looks fine. Then query planning slows because metadata has bloated, object store request counts climb because each query opens thousands of files, and the first compaction becomes a heavy job. The same write-up describes a team that cut its commit interval from 60 seconds to 15 and quadrupled its file count, which is exactly what the arithmetic predicts.
Three controls work together. First, lengthen the commit interval to the slowest freshness your consumers will accept. Second, schedule compaction that rewrites small files into larger ones, using the maintenance procedures your engine exposes. Third, expire snapshots on a schedule so history does not grow without bound. Do all three; compaction without snapshot expiry just changes which files you are paying to store.
Equality-delete bloat in CDC pipelines
When Flink writes a changelog, it often cannot cheaply locate the row being updated, so it writes an equality delete: a record saying that any row matching these key values is gone. That defers the work from write time to read time. The July 2026 write-up puts the consequence in one line: reads pay for every unresolved equality delete. A backlog that nobody resolves is a tax on every query that touches the table.
The write-up's recommendation is to treat the backlog as a liability with a burn-down schedule, and to run maintenance often enough to keep it short-lived. In practice that means compaction jobs that apply deletes to data files and rewrite heavily deleted files, scheduled more aggressively for CDC tables than for append-only ones. It also notes ecosystem work to convert equality deletes into deletion vectors closer to write time, which would relax how often you must compact.
Until that lands everywhere in your stack, measure rather than guess. Track unresolved delete count per table, the ratio of delete files to data files, and p95 query time on the table. If delete files grow faster than compaction retires them, the backlog is winning, and you will see it in query latency before you see it in any alert.
What to monitor regardless of path
Whichever path you choose, instrument the table, not just the pipeline. A healthy consumer lag graph tells you Kafka is being read; it says nothing about whether the Iceberg table is getting worse. The Flink docs recommend alerting on the elapsed time since the last successful commit, a good example of a freshness signal that catches a silently stalled writer.
- •Average data file size and file count per partition, against your target file size.
- •Commit rate and elapsed time since the last successful commit.
- •Unresolved equality delete count and delete-to-data file ratio for CDC tables.
- •Snapshot count and age of the oldest retained snapshot.
- •Compaction lag: how far behind the last rewrite is from the newest data.
Add schema drift to that list. A producer that changes a field type upstream will break a downstream table long before anyone notices file counts, and the schema registry is where that change is cheapest to catch.
Where the Streaming Agent fits
Our Streaming Agent covers Kafka, Pulsar and Kinesis topic governance, schema registry checks and exactly-once monitoring, and it chains with the schema, quality and observability agents. For a Kafka-to-Iceberg pipeline that means one place to ask questions like "show freshness scores for all gold tables" or "what changed in the orders schema since last deploy?" from Claude Code or Cursor, over MCP, without opening four dashboards.
The open-source edition runs locally and is read-only by default, so it can diagnose file-size and delete-backlog problems without touching your tables. Writes, including triggering compaction, sit behind Pro with approval workflows and audit trails. We would rather you approve a rewrite job than discover one. We do not replace Kafka Connect, Flink or your managed service; we watch the tables they produce and help run the maintenance they leave behind.
The point of the swarm is shared context. When a producer renames a column, the Streaming Agent sees the registry change, the Schema Agent maps what depends on it, and the Quality Agent knows which checks will fail. That is the gap between knowing a stream is healthy and knowing the lake table it feeds is still usable.
Frequently Asked Questions
Is the Kafka Connect sink enough for production?
For append-only topics, often yes. It is open source and mature, and it commits on an interval you control. The caveat from the nine-path comparison is that it only transports data, so you must schedule compaction and snapshot expiry yourself. If you need row-level updates and deletes from a changelog, evaluate Flink instead.
Do I need Flink if I only want CDC into Iceberg?
Flink is the common tool for CDC mirrors, but it is not mandatory. Whatever writes the changelog must target a v2 table and will produce delete records that need maintenance. Choose Flink if you want the ecosystem and can operate it; otherwise weigh a managed service against the cost and lock-in tradeoffs described above.
How often should I compact an Iceberg table fed by Kafka?
Match compaction to how fast files accumulate. At a ten-second commit interval you create 8,640 commits a day, so daily compaction may be too slow for CDC tables, while a five-minute append-only table may need far less. Watch average file size and unresolved delete count, and tighten the schedule when either drifts.
Can an agent compact my Iceberg tables for me?
It can monitor them and propose or run the maintenance, depending on edition. In the open-source edition our agents are read-only and report what needs compaction. With Pro, writes go through approval workflows with an audit trail, so a human signs off on the rewrite before it runs.