Black Friday: 30% off every plan through November 30. See the prices
SysDesignPrep.com
Study guide

Updated 24 October 2026

Data lakes, warehouses and lakehouses

Where analytical data lives: data warehouses versus data lakes, columnar files like Parquet, table formats such as Iceberg and Delta Lake, partitioning and file sizing, ingestion with ELT, medallion layers, query engines, governance and cost.

Reading is half of it. Now try it in an interview.An AI interviewer asks you to design an Ad Click Aggregator, out loud or typed, and scores the answer for your level. Or watch a sample interview first, free with no sign-up to start.
Start an AI mock

Try it yourself, in a playground:Row vs column storageStorage tiering

Every large product keeps an analytical copy of its data: events, logs, database snapshots, model features. Analysts query it, dashboards read it, machine learning trains on it, and billing jobs reconcile from it. Interviews for data-heavy products ("design an analytics pipeline", "how do you compute daily reports?") expect you to know where that data lives and how it is organised. The vocabulary has shifted from warehouses to lakes to lakehouses; this guide explains each.

Warehouse versus lake

Data warehouseData lake
Storagemanaged, proprietary columnar storagefiles in object storage (S3, GCS)
Datastructured, modelled tablesanything: raw events, logs, images, tables
Schemaon writeon read
QuerySQL engine built inseparate engines (Spark, Trino, others)
Strengthfast SQL, easy governancecheap, flexible, open formats, huge scale
Weaknesscost at petabyte scale, lock-inhistorically no transactions, messy "data swamps"

Examples: Snowflake, BigQuery and Redshift are warehouses; a lake is a bucket of Parquet files plus engines.

Columnar files

Analytical data is stored in columnar formats such as Parquet or ORC:

  • Values of one column are stored together, so a query reading 3 of 200 columns reads only those.
  • Similar values compress extremely well (often 5 to 10 times).
  • Files carry statistics (min and max per column per row group), so engines can skip blocks that cannot match a filter.

See OLTP versus OLAP.

Table formats: the lakehouse

A folder of Parquet files is not a table: concurrent writers can corrupt it, readers may see half-written data, and there are no updates or deletes. Open table formats (Apache Iceberg, Delta Lake, Apache Hudi) add a metadata layer over the files:

  • ACID transactions: commits are atomic snapshots; readers see a consistent version.
  • Updates, deletes and merges (needed for CDC data and privacy deletions).
  • Schema evolution and partition evolution without rewriting data.
  • Time travel: query the table as of an earlier snapshot, useful for debugging and reproducible training sets.

A lakehouse is object storage plus a table format plus SQL engines: warehouse-like features on cheap, open storage. Warehouses increasingly read these formats too.

Partitioning and file sizes

  • Partition large tables by date (and maybe another low-cardinality column), so queries for a day read only that day's files.
  • Avoid too many small files: streaming ingestion creates thousands of tiny files that slow every query. Run compaction jobs that rewrite them into files of a few hundred megabytes.
  • Sort or cluster data within partitions by frequently filtered columns to make block skipping effective.

Getting data in

  • Events from Kafka written by a streaming job into the lake every few minutes. See how Kafka works.
  • Database tables replicated with change data capture, applied as merges into lake tables.
  • Third-party data loaded by scheduled jobs.

Modern pipelines are ELT: load raw data first, then transform inside the lake or warehouse with SQL (tools like dbt), so raw data can be reprocessed when logic changes.

Layers

A common organisation (sometimes called medallion):

  1. Raw (bronze): data as received, append-only, kept for reprocessing.
  2. Cleaned (silver): deduplicated, typed, joined, with bad records quarantined.
  3. Curated (gold): business-level aggregates and models for dashboards and reports.

Each layer is produced by scheduled or streaming jobs with data quality checks. See batch and stream processing and workflow orchestration.

Query engines

Spark for large transformations and machine learning, Trino or Presto for interactive SQL across sources, warehouse engines for dashboards, and real-time OLAP stores (ClickHouse, Druid, Pinot) for sub-second queries on fresh data. Interactive dashboards on huge data usually read pre-aggregated gold tables or an OLAP store, not raw events.

Governance and cost

  • A catalog of tables with owners, schemas, lineage and access control.
  • Column-level controls and masking for personal data; deletion support for privacy requests. See privacy and data deletion.
  • Storage is cheap, but scanning is not: partition pruning, column selection and pre-aggregation control query costs. See cost-aware system design.

In the interview

For pipelines like Design an Ad Click Aggregator or Design a Monitoring System: raw events land in the lake as Parquet in an Iceberg table partitioned by hour, compacted regularly; batch jobs build cleaned and aggregated tables used for billing reconciliation and reports; a real-time OLAP store serves live dashboards.

Checklist

  • Columnar formats with statistics for skipping.
  • A table format for transactions, deletes, schema evolution and time travel.
  • Date partitioning, compaction of small files, clustering.
  • ELT from Kafka and CDC; raw data kept for reprocessing.
  • Raw, cleaned and curated layers with quality checks.
  • Catalog, access control, privacy deletion and query cost control.

Questions people ask

What is a data lakehouse?

A lakehouse is object storage plus an open table format plus SQL engines: warehouse-like features on cheap, open storage. The table format (Apache Iceberg, Delta Lake or Apache Hudi) adds a metadata layer over Parquet files that gives ACID transactions, updates and deletes, schema evolution and time travel. Without it, a folder of Parquet files is not a table: concurrent writers can corrupt it and readers may see half-written data.

Data lake vs data warehouse: what is the difference?

A data warehouse stores structured, modelled tables in managed, proprietary columnar storage with a built-in SQL engine, while a data lake stores anything (raw events, logs, images, tables) as files in object storage such as S3 and is queried by separate engines like Spark or Trino. Warehouses use schema on write and offer fast SQL and easy governance, but cost a lot at petabyte scale; lakes use schema on read and are cheap, flexible and open.

Why is analytical data stored in Parquet?

Parquet is a columnar format: values of one column are stored together, so a query reading 3 of 200 columns reads only those 3. Similar values compress extremely well, often 5 to 10 times. Files also carry min and max statistics per column per row group, so query engines can skip blocks that cannot match a filter.

What is the medallion architecture?

The medallion architecture organises a lake into three layers: raw (bronze) data kept as received, append-only, for reprocessing; cleaned (silver) data that is deduplicated, typed and joined, with bad records quarantined; and curated (gold) business-level aggregates and models for dashboards and reports. Each layer is produced by scheduled or streaming jobs with data quality checks.

How should data lake tables be partitioned and sized?

Partition large tables by date, and perhaps one other low-cardinality column, so a query for one day reads only that day's files. Avoid too many small files: streaming ingestion creates thousands of tiny files that slow every query, so run compaction jobs that rewrite them into files of a few hundred megabytes. Sorting or clustering data within partitions by frequently filtered columns makes block skipping effective.

What is ELT in a data pipeline?

ELT means loading raw data into the lake or warehouse first and transforming it there afterwards with SQL, using tools such as dbt. The benefit is that raw data is kept, so it can be reprocessed when transformation logic changes. Typical sources are events from Kafka written by a streaming job every few minutes, database tables replicated with change data capture and applied as merges, and third-party data loaded by scheduled jobs.