How to Move Hive Tables to Iceberg Without Stopping Production
Move Hive tables to Iceberg without stopping production: snapshot first, sync live, validate row by row, then swap readers with a view in one step

You can move Hive tables to Iceberg without stopping production by building the Iceberg table alongside the live Hive table, syncing it until it matches, and then swapping readers over in one controlled step. The key is that Iceberg can adopt the Parquet files your Hive table already has.
No data needs to be rewritten, and no reader needs to stop while the work happens.
Iceberg is a modern table format that adds what Hive tables lack: ACID transactions, time travel, schema evolution, and partition evolution. It also removes Hive’s slow directory listing, which makes query planning slow on large tables. The migration is worth doing, but only if it does not interrupt the people who depend on the data.
This guide covers the three migration paths, the live-migration pattern that keeps production running, and the checks that prove the new table is correct before anyone switches to it.

Key Takeaways
- Iceberg adopts your existing Parquet files, so migration is a metadata operation, not a data rewrite.
- Snapshot first to rehearse, then migrate to cut over; never cut over without a rehearsal.
- Keep the Hive table live and writable until the Iceberg table is proven with real queries.
- Use a view swap so readers switch in one step, with an instant rollback if anything is wrong.
- Validate row counts, checksums, and query results before you retire the Hive table.
Why Move From Hive Tables to Iceberg?
Hive tables were designed for a different era of data work. They store data well, but they do not track versions, they do not support safe concurrent writes, and changing a partition layout means rewriting the data. As tables grow, those limits mean slow queries, risky schema changes, and manual workarounds.
Iceberg fixes those limits without changing the data files. It keeps a metadata tree, with manifest files and snapshots, that describes which files belong to the table at any point in time. Readers use the metadata instead of listing directories, which is why query planning drops from minutes to seconds on large tables.
The features that matter most in practice are time travel, rollback, and schema evolution. Time travel lets you query a table as it looked at an earlier point in time. Rollback lets you undo a bad write by switching back to an earlier snapshot.
Schema evolution lets you add, rename, or drop a column without rewriting the data.
None of that is worth an outage. The good news is that the migration does not require one. Because Iceberg works with the Parquet, ORC, and Avro files your Hive table already has, the move is mostly a metadata operation, and the production table can keep serving readers throughout.
Which Migration Path Fits Your Tables?
Iceberg’s Spark integration provides three procedures for migrating from Hive, and they behave very differently. Pick the right one before you run anything, because one of them is a one-way door.
The snapshot procedure creates a new Iceberg table that points at the source table’s data files, without touching the Hive table. The original keeps working, keeps serving queries, and keeps accepting writes. Use snapshot when you want to test Iceberg reads and writes against real data without touching production. It is the safe rehearsal.
The migrate procedure replaces the Hive table with an Iceberg table of the same name. It copies the schema, partitioning, properties, and location, and it keeps the original as a backup table, usually named with a _BACKUP_ suffix.
Use migrate only when you are ready to cut over and every reader and writer can handle Iceberg. After it runs, any job that reads the table as plain Hive will stop working against it.
The add_files procedure registers files from a Hive table or a path into an Iceberg table that already exists. It does not create a table. Use it when you need to import specific partitions, or when the target table already exists with its own layout.
Note that add_files does not check that file schemas match the target table, so validate before you use it.
A fourth option is a full rewrite with CTAS, or create table as select. This reads the Hive table and writes a new Iceberg table with optimised partitioning and file sizes. Use it when the existing layout is bad and you want to fix it as part of the move.
How Do You Migrate Without Stopping Production?
The live-migration pattern has four steps: build, sync, validate, and swap. First, build the Iceberg table alongside the Hive table, either with snapshot for a rehearsal or with CTAS for a fresh layout. The Hive table stays live and writable throughout. Nothing about production changes yet.
Second, set up incremental sync so the Iceberg table stays current. New writes still land in the Hive table, so you need a process that copies new and changed files into the Iceberg table. Use a scheduled job that runs add_files on new partitions, or a streaming process if the data must be fresher.
Track the lag between the two tables as a metric, and alert on it.
Third, validate. Run the same queries against both tables and compare the results, row by row. Include the queries that matter most: the daily reports, the dashboards, and the jobs that feed downstream systems. Any mismatch is a defect to investigate, not a difference to explain away.
Fourth, swap. The cleanest way to swap is the view swap pattern: readers query a view, not the table directly, and you point the view at the Iceberg table when you are ready. If anything goes wrong, you point the view back at the Hive table.
The swap takes seconds, and the rollback is just as fast. That is what makes the migration safe.
What Should You Validate Before Cutover?
Validation is where a live migration succeeds or fails. Start with row counts and checksums. Compare the number of rows in each partition between the Hive table and the Iceberg table, and compare a checksum or hash of the key columns.
Counts alone are not enough, because two tables can have the same count and different data.
Next, compare query results. Pick the most important queries, run them against both tables, and compare the output exactly. Include aggregations, joins, and filters, and automate the comparison so you can run it repeatedly during the sync period.
Then check the writers. Every job that writes to the Hive table needs a plan for the Iceberg table. Some writers can switch directly; others keep writing to Hive during a transition, with sync carrying changes across.
Stop the writers that still target the old table before you run migrate, because they can fail or write to the backup afterwards.
Finally, test performance. Iceberg should be faster for most queries, but verify it on your own workload before you commit. Run the heaviest queries against the Iceberg table and compare elapsed time with Hive. If a query is slower, check the file sizes and partitioning first.
What Happens After the Migration?
The first job after cutover is housekeeping: compact small files with the rewrite_data_files procedure, so queries stay fast, and set up snapshot expiry so old snapshots do not accumulate forever. Iceberg keeps history by design, but history without a retention policy becomes a storage bill.
The second job is cleanup. The migrate procedure leaves a backup Hive table behind. Check it with DESCRIBE FORMATTED before you drop it: the backup and the new Iceberg table can point at the same data files, and dropping a managed Hive backup can delete files Iceberg still needs.
The third job is to use the features you migrated for. Start evolving the schema and partitioning without fear, and use time travel to debug bad writes instead of restoring from backup. The migration pays for itself when the team stops working around Hive’s limits and starts using Iceberg’s strengths.
A Live Hive to Iceberg Migration Checklist
- Confirm every partition uses Parquet, ORC, or Avro; migrate fails on other formats and on bucketed tables.
- Inventory every reader and writer of each Hive table before you choose a migration path.
- Snapshot first to rehearse against real data without touching the production Hive table.
- Build the Iceberg table alongside Hive and set up incremental sync for new writes.
- Monitor sync lag between the two tables and alert when it grows.
- Compare row counts, checksums, and query results between Hive and Iceberg repeatedly.
- Plan every writer’s switch to Iceberg, and stop Hive writers before running migrate.
- Swap readers with a view, so rollback is a one-line change if anything goes wrong.
- Watch the Iceberg table through a full business cycle before retiring the Hive table.
- Check the backup table with DESCRIBE FORMATTED before dropping it, and set snapshot expiry.
Hive to Iceberg Migration Paths Compared
| Path | What it does | Hive table afterwards | Downtime |
|---|---|---|---|
| Snapshot | New Iceberg table over the same files | Unchanged and still writable | None |
| Migrate (in-place) | Replaces Hive table with Iceberg | Renamed to a backup table | Brief, metadata only |
| Add files | Registers Hive files into an existing Iceberg table | Unchanged | None |
| CTAS (full rewrite) | Copies data into a new Iceberg table | Unchanged until you retire it | None |
| Shadow + view swap | Build alongside, sync, then swap the view | Live until the swap is proven | None |
The shadow migration with a view swap is the safest path for production tables, because readers never see a disruption and rollback is instant. For the basics first, see what to check before moving to the cloud.
Frequently Asked Questions
Does migrating to Iceberg rewrite my data?
No, not with snapshot or migrate. Both write Iceberg metadata over the Parquet files your Hive table already has, and no data file is rewritten. Only a CTAS migration copies the data.
What is the difference between snapshot and migrate?
Snapshot builds a parallel Iceberg table over the source’s files and leaves the Hive table untouched, so it is the safe rehearsal. Migrate converts the table in place, keeps the same name, and renames the original to a backup table. Snapshot first, validate, then migrate.
Can I roll back after migrating to Iceberg?
Yes, in two ways. Iceberg itself supports rollback to an earlier snapshot, which undoes a bad write. And if you used a view swap, you can point the view back at the Hive table. Do not drop the Hive backup until the Iceberg table has run through a full business cycle.
What file formats can Iceberg migrate from Hive?
Parquet, ORC, and Avro. The migrate procedure fails on bucketed tables and on any partition stored in another format. Check every partition’s format before you start, because one incompatible partition can block the whole table.
How do I keep the Iceberg table current during the migration?
Set up incremental sync: a scheduled job that runs add_files on new partitions, or a streaming process that carries new writes across. Track the lag between the two tables and alert on it, so the Iceberg table is never silently behind.
Do I need a specific Spark version for Hive migration?
Spark 3.5 with Iceberg 1.7 or later provides native support for the in-place migration procedures, and newer versions add further improvements. Use the Iceberg Spark runtime that matches your Spark version, and configure the session catalog as Iceberg’s SparkSessionCatalog for the migrate procedure.
Conclusion
Moving Hive tables to Iceberg without stopping production is a matter of order, not luck. Snapshot first to rehearse, build the Iceberg table alongside the live Hive table, sync it until it matches, and validate row counts, checksums, and query results before you swap readers over with a view.
The reward is a table format that supports time travel, rollback, schema evolution, and fast query planning, without the directory-listing costs that slow Hive down. Do the migration carefully, keep the old table until the new one is proven, and your readers will never notice the day the format changed.