Schema evolution and time travel — change the table, keep the past
Change a table without breaking its readers or its history: the Iceberg spec's schema and partition evolution, Delta time travel, the history metadata table you query to see what happened, and the snapshot-expiry rule that keeps time travel working while storage stays bounded. The immutable raw zone is the floor under all of it.
At a glance
| When | A consumer asks for last month's numbers exactly as they were; A schema change is pending and you want evolution, not a table rebuild |
|---|---|
| Where | Lakehouse |
| Why | Snapshots make the past addressable and evolution makes change cheap; the retention window and the immutable raw zone decide how far back both reach. |
Learning objectives
- Use schema and partition evolution instead of recreate-and-copy
- Query the history metadata table and time travel within the retention window
- Expire snapshots without breaking time travel — keep one full snapshot
What you need
- A Delta or Iceberg table with a schema you are tempted to change
- Metadata-table access (files, history)
- An ingestion window expiry can be scheduled around
Steps
- Evolution is a spec feature: Iceberg's documentation covers schema and partition evolution alongside the table format, snapshots and manifests, and hidden partitioning. (from ref-iceberg-docs )
- Delta's side of the bargain: its official docs cover ACID transactions on object storage, time travel, OPTIMIZE and Z-ORDER clustering, Delta Live Tables, and Unity Catalog integration. (from ref-delta-docs )
- See the past with SQL: for Iceberg/Delta, query the metadata tables (files, history). (from runbook-small-files-explosion )
- Bound the past safely: expire_snapshots older than the retention window — but keep at least one full snapshot for time travel. (from skill-iceberg-maintenance )
- Evolution without loss starts at the bottom zone: raw/ — immutable, exactly as received; never edited; schema-on-read. (from pattern-medallion-zones )
- Reprocessing needs the original bytes — that force is why raw is immutable and why an evolved table can always be rebuilt from its source. (from pattern-medallion-zones )
- Schedule expiry like compaction: Lakehouse Guard is a guard that blocks compaction or snapshot expiry during peak ingestion windows. (from plugin-lakehouse-guard )
Check yourself
- You can time travel to a snapshot inside the retention window after expiry ran.
- A schema change on curated/ required no rewrite of raw/ — the original bytes were never edited.
- The history metadata table answers what changed and when without leaving SQL.
Worked example
The snapshot expiry rule — from skill-iceberg-maintenance
`expire_snapshots` older than the retention window — but keep at least
one full snapshot for time travel.
The raw zone contract — from pattern-medallion-zones
raw/ — immutable, exactly as received; never edited; schema-on-read.
Sourced from
Security scan
Last sweep 2026-10-24: 0 finding(s), 0 marked as examples.
Common gotchas
- expire_snapshots must keep at least one full snapshot or time travel breaks.
- Schema and partition evolution are spec features — the format, not a copy job, is the mechanism.
- Snapshot expiry is maintenance with a window: the guard blocks it during peak ingestion.
Production considerations
- Set the snapshot retention window deliberately — it is the knob that trades storage for time-travel depth.
- Keep raw/ immutable and schema-on-read so every evolution has an original to return to.
Diagram
schema evolution & time travel
|
|- spec: schema evolution | partition evolution | hidden partitioning
|
|- db.tbl.history --> what changed, when
|
|- time travel --> snapshot inside the retention window
|
|- expire_snapshots --> keep one full snapshot
|
raw (immutable, schema-on-read) --> curated (evolved) --> serving
Registry stats
| Verification | community · Oct 23, 2026 |
|---|---|
| Completeness | 81 |
| Trust multiplier | ×1.25 |
| Composite | 34.15 · adequate |
| Freshness | 1 days since last source check |
| Difficulty | intermediate |
| Version | 0.1.0 |
| License | CC-BY-4.0 |
| Security flags | none |
Did this solve your problem?
Schema evolution and time travel — change the table, keep the past