The Lakehouse
A warehouse on cheap files, transactions and all
A lakehouse is a lake with warehouse features: transactional ACID on open files via a table format (Delta Lake, Iceberg), so you get cheap storage, BI-grade queries, SQL, and governance without maintaining two systems.
What you will learn
- Explain the table-format trick that gives lakes ACID
- Describe snapshot isolation readers get
- Compare lakehouse vs warehouse trade-offs
What is this?
A lakehouse layers a transactional table format (Delta Lake, Apache Iceberg, or Hudi) over object storage and open columnar files. The format keeps a log of committed versions so writers commit atomically, readers see stable snapshots, and engines like Spark/Trino/DuckDB give warehouses-grade SQL — without a separate warehouse copy.
Why do you need it?
- REQUIRED slug: de-foundations links here as the canonical lakehouse reference.
- It removes the warehouse-vs-lake fork: one copy, transactional, open.
- The transaction log is the single idea that makes 'cheap files + ACID' possible.
Mental model
A bookshelf with a librarian's changelog
A lakehouse table format
Books (files) sit on cheap shelves, but a changelog records who moved/added/removed what and when. Readers take a frozen snapshot of the changelog, so everyone reads a consistent shelf while writers safely shuffle books.
How it works
- A table format stores old/new data as Parquet files plus a transaction log (Delta log / Iceberg metadata) in the same location.
- A commit appends a new log entry pointing to the new version (atomic file operations on object storage).
- Readers pin a snapshot (version) and read only files that version points to — snapshot isolation.
- Optimistic concurrency: writers retry on conflict; like a versioned git merge.
- Built-in helpers: time travel (read a historical version), vacuum of old files, Z-order/sort compaction.
One commit in the transaction log.
Examples
Lakehouse DML looks exactly like warehouse SQL
-- Delta Lake (SQL renders the warehouse experience on files):MERGE INTO analytics.orders AS tUSING stage.new_orders AS sON t.order_id = s.order_idWHEN MATCHED THEN UPDATE SET amount = s.amountWHEN NOT MATCHED THEN INSERT ROW; -- Snapshot reads via time travel:SELECT * FROM analytics.orders VERSION AS OF 12 WHERE day = '2026-03-14';MERGE, snapshots, and time travel are provided by the table format's log — the warehouse layer for free.
In production
- A team replaces a nightly copy-into-warehouse with a single Delta table: one copy, SQL on top.
- An ML group shares the same tables as BI; model features and dashboards read one snapshot.
- A backfill is applied as a transaction: readers stay on the old version until the new commit is verified.
Best practices
- Choose a table format once and standardize; mixing Delta/Iceberg per table multiplies ops.
- Run compaction (file count down) and vacuum only after retention windows.
- Tune optimistic-concurrency retries for heavier writers.
- Match BI tools to the format: Trino/DuckDB read Iceberg and Delta natively.
Common mistakes
- Using multiple formats per table and breaking cross-engine consistency.
- Vacuuming too early and destroying time travel or in-flight readers.
- Forgetting writer coordination: grabbing full-table locks where incremental commit would be safer.
Debugging tips
- A reader seeing stale data usually means the snapshot pointer has not advanced; check the commit log tail.
- A 'file not found' during time travel points at vacuum garbage collection removing files still referenced.
- MERGE suddenly slow = files fragmented; check file count per partition and run compaction.
Interview checkpoint
Hands-on lab
- Show the transaction-log pattern: commit = atomic pointer flip
- Demonstrate snapshot-stability while a writer commits
- Do a MERGE-style upsert and read VERSION-style pinnable state
ACID on Files With a Table Format (DuckDB + Delta/Iceberg-like)
35 min · advanced
Quick quiz
A lakehouse table format gives snapshot isolation so readers see a consistent version while writers commit.
Delta Lake, Apache Iceberg, and Apache Hudi are best described as…