Data modelling · mid
Lake, warehouse, lakehouse, medallion and partitioning
A lake holds cheap files, a warehouse holds managed tables, and a lakehouse puts transactions on files with an open table format. Partitioning and clustering decide how much a query reads.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Data lake: cheap object storage (S3, ADLS, GCS) with files in any format and schema on read. No transactions, weak governance, hard updates: it can become a data swamp.
- Warehouse: a managed SQL engine with tables, transactions and fast queries, but costlier for huge raw data and ML.
- Lakehouse: open table formats (Delta Lake, Iceberg, Hudi) on object storage add transactions, schema enforcement, time travel and MERGE or DELETE. Many engines can read the files.
- Medallion layers: bronze is raw data as received (append-only, replayable), silver is cleaned, typed and deduplicated, gold is business-level marts. It is a convention, not a law. A catalog lists tables, schemas and permissions.
- Partition on a low-cardinality column used in almost every filter, usually the event date. Decide whose day it is: IST or UTC. Never partition by a high-cardinality column such as user_id.
- Aim for files of roughly 128 MB to 1 GB. Too many partition columns make tiny files.
- Clustering inside partitions: Delta liquid clustering (CLUSTER BY) or Z-order; Iceberg sort orders applied by rewrite_data_files; BigQuery PARTITION BY DATE(ts) CLUSTER BY up to four columns. Snowflake micro-partitions are automatic.
- Iceberg hidden partitioning: partition by days(event_ts), queries filter on event_ts and still prune, and the scheme can change later without rewriting old data.
- Enforce the filter: BigQuery require_partition_filter, views with the filter built in, cost limits.
The red pen
Common traps: mistake → fix
Mistake: Lakehouse means Databricks
Fix: it is a pattern built on open table formats that many engines read.
Mistake: Partition by user_id for fast user queries
Fix: millions of folders and tiny files.
Mistake: All three medallion layers must be full copies
Fix: it is a convention; use what you need.
Easy to hard
Questions interviewers ask, easy to hard
- What is the difference between a lake, a warehouse and a lakehouse?
- What are bronze, silver and gold?
- How would you partition and cluster a table that grows 2 TB a day?
- What is hidden partitioning in Iceberg?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.