Lakehouse: S3 and Iceberg
A data lake is files in object storage: S3 or a service compatible with it. Storage is cheap and any engine can read it, but a set of files has no transactions. A job that writes 200 files becomes visible to readers one file at a time, a failed job leaves junk behind, and query planning starts by listing prefixes.
A lakehouse fixes this with a table format: Iceberg, Delta Lake, or Hudi. The format keeps the exact list of the table's files in metadata and commits with one atomic swap of the pointer to the new metadata version. Snapshots and time travel, schema and partition evolution, row-level deletes, and conflicts between concurrent writers all grow from that.
Interviews test the topic bottom-up. What S3 guarantees and what it does not. How Parquet lets you read three columns out of a hundred and skip row groups you do not need. Why a user_id partition and a commit every minute produce millions of small files. What an Iceberg commit writes and how copy-on-write differs from merge-on-read. Below is a map from storage up to the engines. Versions: Iceberg 1.12 and table spec v1–v3 (v4 in development), Trino 484.
Topic map
- Object storage — objects and prefixes, listing, strong per-key consistency since December 2020, why a "directory rename" in S3 is copy plus delete and there is no atomic multi-object write, S3-compatible stores.
- File formats — Parquet, ORC, and Avro, row groups, column chunks, and pages, footer statistics and row-group skipping, encodings, Hive-style partition layout, and the small-files problem.
- Iceberg — why a table format, the metadata.json → manifest list → manifests tree, snapshots and time travel, commits and conflicts, hidden partitioning and partition evolution, copy-on-write versus merge-on-read, compaction and snapshot expiry, Delta and Hudi compared.
- Query engines — Spark versus Trino over the lake, Hive Metastore versus REST catalogs, partition-count limits.
Common traps
| Mistake | Consequence |
|---|---|
| Blaming partial output on S3 eventual consistency | S3 has been strongly consistent per key since December 2020; the problem is that there is no multi-file commit |
| Treating a directory rename in S3 as atomic | It is a copy and a delete of every object: slow, and it can fail halfway |
Partitioning by user_id, or by hour × country × user | Millions of partitions and KB-sized files, while date filters get no faster |
| Committing to Iceberg every minute with no compaction | Thousands of small files and manifests; planning and reads slow down |
Expecting DELETE or compaction to free space at once | Snapshots keep the old files until snapshot expiry deletes them |
| Assuming partition evolution rewrites old data | It is a metadata operation: old files keep their old layout |
| Writing Parquet unsorted on the filter column | Every row group's min/max range covers everything, so nothing is skipped |
Interview relevance
Lakehouse questions check whether a candidate understands the mechanism behind the word "transactions". A strong answer explains behaviour through files and the commit: "the reader saw half the output because files became visible one by one, while a table format publishes them with one pointer swap".
Typical checks:
- How Parquet and ORC differ from Avro and CSV, and what each is for.
- How Parquet footer statistics let a reader skip row groups, and why they are useless without sorting.
- How to choose a partition key and where small files come from.
- What breaks with "just Parquet in S3" and what a table format fixes.
- What an Iceberg append writes and how the metadata tree is built.
- Copy-on-write versus merge-on-read, and which to pick for a frequent
MERGE. - What happens on two concurrent commits and after a commit timeout.
- Partition evolution, and why old data did not get faster.
Common wrong answer: "S3 is eventually consistent, so readers see incomplete data, and Iceberg fixes that." In fact S3 has been strongly consistent for every key since December 2020. What breaks is something else: there is no atomic multi-object write, so a job's output of many files appears piece by piece. Iceberg records the file list in metadata and publishes it with one atomic pointer swap.