guide
guide8 min read

How to Migrate to Apache Iceberg Tables Without Running Both Systems Forever

A six-step plan with exit criteria, so the parallel run ends on a date instead of drifting

To migrate to Apache Iceberg tables, you inventory your tables, choose a catalog, convert each table with the method that fits it (an in-place migrate, a metadata-only snapshot or add_files, or a full rewrite), validate the result against the source, run both systems in parallel for a fixed window, and then cut readers over on a date you set in advance. The Apache Iceberg Spark procedures documentation describes the snapshot, migrate and add_files procedures that make the conversion step cheap. The hard part is the parallel run: 2026 migration playbooks commonly advise running both systems for at least two weeks and warn that teams often end up running both indefinitely. This guide is built around avoiding that.

Key Takeaways

  • •Conversion is the easy part. Iceberg's snapshot, migrate and add_files procedures can create Iceberg metadata over existing data files without rewriting them.
  • •Both systems running forever is a planning failure, not a technical one. It happens when the parallel run has no exit criteria and no end date.
  • •Define cutover criteria per table before you convert anything: row counts, aggregate checksums, freshness and a named owner for sign-off.
  • •Migrate in waves by dependency order, leaf tables and low-risk consumers first, and retire the legacy copy of each wave before starting the next.
  • •An AI coding agent can do the inventory, SQL translation and validation drafting, but a human should still approve the cutover.

How to migrate to Apache Iceberg tables: the plan at a glance

We've split the work into six numbered steps. Steps 1 to 3 are preparation and conversion. Steps 4 and 5 are where migrations stall. Step 6 is the one teams skip, and it's the one that stops the dual-run from becoming permanent. In our opinion, the single most useful artifact is a one-page cutover contract per wave: which tables, which validation checks, which date, who signs off.

StepOutputDone when
1. InventoryTable list with size, format, owner, consumersEvery table has an owner and a wave number
2. Catalog and specChosen catalog, format version, partition policyCatalog reachable from every engine that reads the data
3. ConvertIceberg tables for wave 1Tables queryable through the Iceberg catalog
4. ValidateReconciliation report per tableChecks pass on the agreed thresholds
5. Parallel runDated window with exit criteriaWindow ends on schedule with a go or no-go
6. Cut over and retireReaders repointed, legacy copy droppedLegacy tables deleted or archived on a set date

Step 1: inventory every table and its consumers

List every table you plan to move, with its row count, size on disk, file format, partitioning scheme, write pattern (append, upsert, full refresh), owner and downstream readers. The readers matter most. A table with no queries in 90 days is a candidate for archiving instead of migrating, and a table with twenty dashboards behind it belongs in a late wave.

Sort the list into waves by dependency order. Start with tables that have few downstream consumers and simple write patterns. Leave the hot, heavily joined tables for later, when you've already seen how the process behaves. Questions worth answering before you start include: which tables haven't been queried in 90 days, what's the blast radius if one of these tables changes shape, and which jobs write to it.

This is also where an agent earns its keep. Our Migration Agent, which you can find at dataworkers.io, analyzes legacy SQL and ETL definitions to produce this lineage and wave ordering instead of leaving it to a spreadsheet. The same inventory can be built by hand if your estate is small. The point is that it exists in writing before conversion begins.

Step 2: pick the catalog and format version first

Every Iceberg table lives in a catalog, and every engine that reads or writes the table has to be able to reach that catalog. Choose it before converting anything, because changing catalogs later means re-registering every table. The Iceberg table spec defines the format versions and what each one supports, so check which version your engines can read and write before you decide.

  • •Confirm every engine in your estate (batch, interactive, streaming, BI) has a working Iceberg connector for your chosen catalog.
  • •Decide the format version once, per the spec, and apply it to all new tables so you don't carry mixed versions through the migration.
  • •Set a partitioning policy up front. Iceberg's hidden partitioning lets you change partition layout later without rewriting queries, but a sensible starting point still avoids immediate rework.
  • •Decide who owns table maintenance (compaction, snapshot expiry, orphan file cleanup) from day one.

Step 3: convert tables with the cheapest method that works

The Iceberg Spark procedures give you three ways to attach Iceberg metadata to data that already exists, and a fourth option is a full rewrite. Pick per table, not per project.

MethodWhat it doesUse it when
snapshotCreates a new Iceberg table that reads the source table's existing data files, leaving the source untouchedYou want a safe, throwaway trial of the Iceberg table before committing
migrateReplaces the source table with an Iceberg table over the same data filesThe table is in a supported source format and you're ready to switch it in place
add_filesAdds existing data files into an Iceberg table you've already definedYou want control over the Iceberg schema and partitioning, or the source isn't a catalog table
Rewrite (CTAS or INSERT)Writes new data files in Iceberg through your engineThe table needs a new layout, mixed file formats, or you want a clean compaction at the same time

We recommend snapshot for the first wave. It gives you a real Iceberg table to query and validate while the legacy table keeps serving production, which is what makes the parallel run in Step 5 cheap. Check the procedure reference for the exact arguments and caveats for your source format before running anything. Note that data files shared between the source and an Iceberg table created by snapshot shouldn't be written to by both sides, so don't point production writers at the snapshot table.

Schema is the other conversion risk. Type mappings, nullability and column renames can differ between the legacy system and Iceberg. Our Schema Agent compares column-level definitions across the two sides and flags drift before it reaches a consumer.

Step 4: validate against the source before anyone depends on it

Validation is a set of checks you agree on before conversion, not a spot check you do afterward. For each table, define the checks and the tolerance for each one in the cutover contract.

  • •Row counts: total and per partition, compared between source and Iceberg table.
  • •Aggregates: sums, min and max, and distinct counts on key columns, compared on the same filters.
  • •Nulls and types: null rates per column and a column-by-column type comparison.
  • •Freshness: the Iceberg copy's latest timestamp against the source, measured the same way.
  • •Query equivalence: your ten most expensive or most-used queries run on both sides, with results diffed.

Write these as scripts that return pass or fail, so the same check can run every night during the parallel run. If your team works in Claude Code or Cursor, this is a good job to hand to an agent: have it read the table definitions, generate the reconciliation queries, and open a diff for review. We expose our agents as MCP servers, per the Model Context Protocol, so the same workflow runs from the terminal you already use.

Step 5: run the parallel window with an end date

This is the step that decides whether you finish. Parallel runs drift because nobody wrote down what "done" means. Put the following in the cutover contract before the window opens.

  • •A fixed start and end date. Two weeks is a common minimum in the playbooks we reviewed, but the right length is your longest business cycle, such as a month-end close, not a round number.
  • •Exit criteria that are mechanical: all nightly validation checks green for N consecutive days, and no open data-quality tickets on the table.
  • •A named approver per table. If nobody can say "go", the answer defaults to "keep both".
  • •A default action on the end date. We suggest the default is cutover for tables that pass and a written exception, with a new date, for tables that don't.

Keep the window cheap. Writers should go to the legacy system only, while the Iceberg copy is refreshed by a job you control, so you're validating one source of truth instead of reconciling two live writers. Dual writes are the most common way a two-week plan becomes a two-quarter one.

Step 6: cut over readers and retire the legacy copy

Cutover means repointing readers first, then writers, then retiring the legacy table. Repoint dashboards, notebooks and downstream jobs wave by wave. When writers move, make the Iceberg table the system of record and stop refreshing the legacy copy.

Then retire it on a date. Rename the legacy table, wait one short, stated grace period, and archive or drop it. We think this is the most skipped step in migrations, and it's the one that determines whether the old system is still costing you money a year later. Before dropping anything, ask whether the join on your key columns is still safe after the migration and what depends on the old object.

Post-cutover, run the Iceberg maintenance you assigned in Step 2: compaction, snapshot expiry and orphan file cleanup. Tables that are never maintained get slower and more expensive, and teams then blame the new format for a problem that's operational.

Where agents help and where humans stay in the loop

A migration is mostly reading old code, translating it, and checking the result, which suits a coding agent. In our experience the useful split is that agents draft the inventory, the translated SQL and the validation scripts, and people approve each wave's cutover contract. Data Workers' OSS edition is read-only by default, so an agent can analyze the legacy estate and propose changes without being able to write to production. Writes and approval workflows are in the Pro edition. We covered how our agents coordinate pipeline and governance context in separate posts on the site, and the same context is what lets a migration check blast radius before it drops a column.

Frequently Asked Questions

How long does it take to migrate to Apache Iceberg tables? It depends on table count, dependency depth and how many engines read the data. Conversion of a single table with snapshot or migrate is typically fast because it adds metadata over existing files, while validation and the parallel run dominate the calendar. Plan by waves and set the end date for each wave up front rather than estimating the whole estate at once.

What is the difference between snapshot and migrate in Iceberg? According to the Iceberg Spark procedures documentation, snapshot creates a separate Iceberg table over the source's data files and leaves the source table untouched, while migrate replaces the source table with an Iceberg table. Use snapshot to test and validate, and migrate when you're ready to switch in place.

Do I need to rewrite my data files to move to Iceberg? Not always. The snapshot, migrate and add_files procedures build Iceberg metadata over existing data files. You rewrite when you want a different layout, need to compact small files, or the source format isn't supported by those procedures.

How do we avoid running both systems forever? Write exit criteria and an end date into a cutover contract before the parallel run starts, name an approver per table, make the default action on the end date a cutover, and schedule the legacy table's retirement in the same document. The technical work rarely causes indefinite dual-running. Missing decisions do.

Can an AI coding agent run the migration for us? An agent can do the inventory, SQL translation and reconciliation scripting, and our Migration Agent is built for that work. We recommend a human approve each wave's cutover, especially for tables with many downstream consumers.