The Lakehouse Problem
How two open table formats turn a folder of Parquet files into something that acts like a real table. What's covered: the metadata layouts, how a commit works, where concurrent writers collide, and the cleanup jobs nobody runs for you. What's not: Parquet internals, engine-specific SQL, vendor pricing.
A table format is not a file format and not a database. It's a layer of metadata that turns a folder of Parquet files into a real table — transactions, schema changes, time travel — purely by controlling which files a reader is allowed to see.
The road here — four moves, each fixing the last one's problem
| Era | Why people moved to it | What broke, forcing the next move |
|---|---|---|
| SQL warehouses pre-2005 |
Mature, transactional, SQL-native. | Compute + storage bundled on proprietary hardware — scaling meant buying a bigger box. Licensing made "store every click event forever" uneconomical as web-scale data exploded. |
| Hadoop 2003–2006 |
GFS/MapReduce showed how to store and process across thousands of cheap commodity machines. Open source, horizontal, no licensing. | Using it meant writing Java MapReduce jobs — inaccessible to the SQL-literate analysts who'd been querying warehouses for years. Storage got cheap; usability didn't come with it. |
| Hive 2008 |
HiveQL compiles SQL down to MapReduce, so existing analysts could query HDFS files. A SQL adapter over cheap storage — not a database of its own. | Fine under that era's pattern: batch-write once, batch-read many, one writer, append-only. No transactional need — until the pattern changed. |
| Multi-engine lakes 2010s |
Spark for ML, Presto/Trino for interactive SQL — both reading and writing the same directories Hive used, with zero coordination protocol. Kafka pipelines committing every few seconds. GDPR requiring row-level deletes. | "Table = directory, discovered by listing it" has no atomic commits, no isolation, no file-level pruning, no time travel. |
| Iceberg / Delta Lake 2017–2019 |
Netflix hit every failure mode at petabyte scale and built Iceberg (donated to Apache, 2018); Databricks built Delta Lake (2019) for the same problem, Spark-first. | This is the lakehouse — the rest of this guide. |
The arc in one line: SQL warehouses (expensive, vertical) → Hadoop (cheap, horizontal, no SQL) → Hive (SQL bolted onto cheap files) → multi-engine + streaming + compliance exposed that "table = directory" has no transactions → Iceberg/Delta Lake (warehouse guarantees, lake storage).
What category of system is this, exactly?
| Not a database | No server, no connections, no query execution. Nothing to point a client at. |
|---|---|
| Not a file format | Parquet/ORC still holds the actual bytes. These sit above it. |
| A metadata + protocol layer | Track file lists, schema, and history in a versioned way — plus libraries engines link against. |
What a Hive table actually is
No database engine is running here — a Hive table is files plus a naming convention, read by whichever engine you point at it.
- The data is plain files (usually Parquet) in a directory in cheap storage — originally HDFS, later S3.
- Partitioning is just subdirectories per partition value:
dt=2024-01-01/,dt=2024-01-02/. That's how you avoid scanning years for a one-day query. - The Hive Metastore (HMS) is a small separate database holding one row per table:
events → (s3://warehouse/events/, schema, partition columns). It does not track individual files. - At query time, the engine asks HMS where the table lives, then does a live
LIST s3://warehouse/events/dt=2024-01-01/to find out what files exist right now — and reads all of them.
s3://warehouse/events/
├── dt=2024-01-01/
│ ├── part-00000.parquet
│ ├── part-00001.parquet
│ └── ...
└── dt=2024-01-02/
└── part-00000.parquetSo: Hive table = directory of files + a metastore entry pointing at that directory. There is no explicit record of which files, exactly, make up the table at a given moment — the engine lists the folder and treats whatever it finds as the table. That single fact is the root cause of every failure mode below.
Why this breaks in practice
| Problem | Root cause | Concrete failure |
|---|---|---|
| No atomic commits | A job writes N files then "registers" them by literally putting them in the directory. No single atomic action makes all N appear at once. | A job writing 10,000 files crashes after 6,000. Readers already see a partial, corrupt table — some rows present, some missing, no way to tell which. |
| No reader/writer isolation | A reader listing mid-write sees whatever files exist at that instant — an arbitrary partial state. | Job A overwrites a partition (delete old, write new). Job B lists between the two → reads zero rows. Or reads a mix of old and new files with duplicated data. |
| Partition-level pruning only | HMS tracks which partition directories exist. Nothing is known about a file's contents until it's opened. | WHERE dt='2024-01-01' AND user_id=42 still opens and scans every file in that day — there's no index into "which files might contain user_id=42." |
| Rename/drop column is a footgun | Hive tracks schema by column position or name in the metastore, separately from what's physically in old Parquet files. | Rename email → email_address. Old files still physically say email. Depending on engine settings, old data silently reads back under the wrong column or as null. |
| Listing is slow, sometimes wrong | LIST on S3 is a paginated, metered API call — not an O(1) metadata lookup. | 100,000 files across 5,000 partitions takes tens of seconds just to plan, before a byte of data is read. |
| No true time travel | Once a file is overwritten or deleted, the old version is gone. No undo. | An accidental INSERT OVERWRITE wipes a table. Recovery = restore from backup or re-run the whole upstream pipeline. |
The fix, in one sentence
Stop discovering files by listing directories. Instead, maintain an explicit, versioned list of exactly which files belong to the table at each point in time — and change that list atomically.
That one sentence is the whole idea. Manifests, transaction logs, snapshots, optimistic concurrency: everything else in this guide is machinery to make it true, and to keep it fast and safe when many engines and many writers hit the table at once.
Put concretely: a commit to an Iceberg or Delta table is one pointer swap that says "the table is now version N, and version N is exactly this list of files." It is not a series of file creates and deletes that a reader might catch halfway through.
Why 2017–2019, not 2005?
Hive-style lakes existed for a decade before table formats showed up. Two things changed:
1 · Cloud object storage became the default
On S3 and GCS, LIST is an API call you pay for — not a free local directory read the way it was on HDFS. S3 also used to hand back stale listings for a while after an overwrite. Finding files through metadata skips LIST almost entirely.
2 · Streaming made small files unavoidable
Micro-batch writers commit every few seconds, so they produce huge numbers of tiny files. Hive-style tables were never built to track that many files efficiently, or to compact them safely while others are reading.
Third: people started expecting warehouse behavior from lake storage. Once BI tools and ML pipelines both wanted the same data, teams needed transactions, schema changes, and time travel on the lake — not after copying everything into a warehouse.
"Lakehouse" — what the word actually means
Lakehouse = a data lake (cheap object storage, open file formats, engine-agnostic) with a table format layer that gives it the transactional guarantees historically exclusive to warehouses.
| Data Warehouse Snowflake / BigQuery | Data Lake raw S3 + Hive | Lakehouse S3 + Iceberg/Delta | |
|---|---|---|---|
| Storage | Proprietary, warehouse-managed | Open files, any engine | Open files, any engine |
| ACID transactions | yes built in | no | yes via table metadata |
| Schema evolution | yes | painful | yes safely (see Schema evolution and time travel) |
| Time travel | limited | no | yes |
| Multi-engine on same data | only via Iceberg-format tables | unsafe writes | yes safely (see Concurrency control, Catalogs and engine interop) |
| Cost model | Storage priced near object-store rates; markup is on compute | Storage only, cheap | Storage only, cheap |
The pitch: warehouse guarantees, on cheap storage any engine can read. The cost is complexity. You now own the metadata files, the compaction jobs, and the catalog choice a managed warehouse would have hidden from you. The parts from Iceberg's metadata tree to Catalogs and engine interop are that complexity, spelled out.
One-sentence comparisons
| System | Contrast |
|---|---|
| Plain Hive table | No transactions, no time travel, partition-level pruning only, directory-listing discovery — the thing both Iceberg and Delta exist to replace. |
| Snowflake / BigQuery | They keep your data in their own closed format (Snowflake FDN, BigQuery Capacitor), which only their engine can plan against. Both now also write Iceberg, which tells you what the real lock-in was: never the transactional guarantees, always the closed storage. A table format gets you the same guarantees with the files readable by Spark, Trino, Flink, and DuckDB by default instead of as a special table type. |
| Apache Hudi | The third major open table format (also 2017, from Uber). Built first for fast upserts, using a log-structured merge-on-read design. The Iceberg vs Delta vs Hudi part covers where it fits. |
| Delta Lake vs Iceberg | Same problem, different metadata. Delta keeps one running JSON log; Iceberg keeps a tree of immutable, versioned files. Full comparison in the Iceberg vs Delta vs Hudi part. |
When to reach for one — and when not to
| Reach for Iceberg or Delta Lake when… |
|---|
| Multiple engines (Spark ETL, Trino BI, Flink streaming) need to read and write the same data safely |
| You need schema evolution over years of accumulated data without rewriting history |
| You need time travel / audit history ("what did this table look like before yesterday's bad job?") |
| You're doing row-level updates/deletes/merges at rest in object storage — GDPR deletes, CDC upserts, SCDs |
| You want warehouse ergonomics without warehouse storage lock-in and markup |
| Situation | Use instead |
|---|---|
| Single engine, single team, truly append-only and small | Plain Parquet/Hive table — the metadata layer is pure overhead |
| Sub-second point lookups by primary key | A real OLTP/KV store (Postgres, DynamoDB) — table formats are built for analytical scans, not point gets |
| Volume fits a managed warehouse, no multi-engine need | Snowflake/BigQuery — simpler operationally, no "own your compaction jobs" tax |
| True real-time (sub-second) freshness for OLAP | ClickHouse / Druid / Pinot fed by streaming — lakehouse formats are batch/micro-batch native |
The Invariants
- Guarantees: A reader can tell exactly which files make up the table at a given version — without listing a directory, and without ever seeing a half-finished write.
- Does not guarantee: It doesn't make writes faster, doesn't stop small files from piling up, and doesn't run any maintenance for you. It turns "unsafe and unfixable" into "safe, but somebody has to operate it."