learn-data-warehouse-with-phoebe / Builder session 9 of 10
Learn Data Warehouse with Phoebe · Builder track · Session 9 of 10

Lakehouse and the modern stack

Daybreak's warehouse is built, tuned, and paying for itself. Tonight you zoom out: where does this warehouse sit in the modern data landscape? You will meet the lake, watch it converge with the warehouse into the lakehouse, learn the two modeling styles that compete with your star schema - and then do the thing most courses only describe: write a real Parquet file and query it back, live in your browser.

🔴 Builder track Practitioners: analysts · DE · DS · PMs Runs in your browser · DuckDB 45 min
0-3 · Recap 3-18 · Lakehouse & modeling styles 18-40 · Build-along: Parquet for real 40-45 · Q&A
Part 0

Where the build stands

You own the full inside of a warehouse now: staging (b2), the star (b3-b4), history (b5), loads (b6), marts (b7), tuning (b8). What is left is the OUTSIDE - the wider stack your warehouse lives in. Two questions dominate every architecture meeting you will ever sit in: "warehouse or lakehouse?" and "is a star schema still the right shape?". Tonight you get working answers to both, plus hands-on proof that the file format at the center of it all - Parquet - is something your browser tab can read and write today.

Live - presented in session Self-study - read after class ▶ Live warehouse - editable & runnable Official sources covered
★ What you walk out with today The warehouse-lake-lakehouse story told as one converging timeline, a fair hearing for One Big Table and Data Vault (and the reasons star still wins at Daybreak's size), and a Parquet file you wrote and queried yourself - the core mechanic of every lakehouse, executed in a browser tab.
Part 1 · covers IBM M1 lakes & lakehouses, 365DS S7 DW vs lakehouse

Warehouse, lake, lakehouse: a ten-year convergence 7 min live

Around 2010, teams drowning in raw files built data lakes: cheap object storage, any format, schema figured out later - flexible, and famously prone to becoming swamps. Around 2015, cloud warehouses (Redshift, BigQuery, Snowflake) made the modeled, SQL-first warehouse easy to rent, and structure won analytics back. The 2020s move is the merger: the lakehouse keeps data in open files on cheap storage but adds the warehouse's table behavior - schemas, transactions, fast SQL - on top.

Ten years of "where should analytics data live?" ~2010 · the lake dump every raw file cheap, flexible, schema later risk: becomes a swamp ~2015 · cloud DW rentable warehouses modeled, SQL, governed risk: cost + lock-in 2020s · lakehouse open files on cheap storage + warehouse table behavior one copy, many engines lake strengths kept: open formats, cheap storage, any workload (BI, ML, ad hoc) warehouse strengths kept: schemas, transactions, fast SQL, governance The skills transfer whole: a lakehouse still wants staging, stars, and marts - your b2-b7 work.
🔍 Click to zoom - the lake and the warehouse stopped fighting and merged
LiveThe open formats that made it possible4 min

The lakehouse only works because the file layer got smart. Two layers of format, worth keeping straight:

  • Parquet - the file format. A columnar file: column-organized bytes, compressed, with min/max metadata baked in. Effectively a warehouse storage layer you can email, drop in S3, or hand to any engine. You will write one in Demo 1.
  • Iceberg and Delta Lake - the table formats. A layer of metadata ON TOP of many Parquet files that adds what files alone lack: transactions, schema evolution, time travel, safe concurrent writers. They turn a folder of files into a reliable TABLE. Name-drop level tonight - no hands-on; know that "lakehouse" in a vendor pitch almost always means "Iceberg or Delta over Parquet".
Why "open" matters commercially. When your data sits in open Parquet/Iceberg instead of a vendor's proprietary storage, you can point Snowflake, Databricks, DuckDB and Spark at the SAME copy - and switching engines stops being a migration project. That bargaining power is half the reason the industry moved.
Self-studySo which one should Daybreak run?3 min read
  • Small team, BI-first workload (Daybreak today): a plain warehouse - or honestly DuckDB over Parquet - is simplest and cheapest. Lakehouse machinery earns nothing here yet.
  • Warehouse + heavy ML/data-science on raw data: lakehouse shines - one copy serves SQL dashboards and Python training jobs without export pipelines.
  • Petabyte scale, many engines, many teams: lakehouse is winning this tier decisively; storing everything twice (lake for ML, warehouse for BI) is the pattern it killed.
  • Either way: the modeling layers of this course carry over unchanged - the lakehouse changed WHERE tables live, not what a good star schema looks like.
Part 2 · covers DLAI M1 data vault + one big table, LinkedIn Intro-DW "when not dimensional"

Beyond the star: OBT and Data Vault 7 min live

The star schema you built in b3-b4 is not the only respectable shape. Two rivals deserve a fair hearing: One Big Table (denormalize everything into one wide table) and Data Vault (decompose everything into hubs, links and satellites). Both exist because they optimize for something the star does not - and both cost something the star gives you for free.

Star schema fct_orders dim_date dim_cust dim_prod clear grain, reusable dims, one obvious join per question best for: BI at any team size One Big Table obt_order_line order + customer + product + date cols, all flattened 22 columns, zero joins no joins to teach, tool-friendly; wide, repetitive, update-hostile best for: small teams, join-shy BI Data Vault hub_cust hub_prod sat_cust sat_prod auditable, multi-source, agile; many tables, needs a star on top best for: big integration programs Honest default: star for Daybreak-sized problems. OBT is a serving layer, Vault is a back room.
🔍 Click to zoom - three shapes, three optimization targets, one honest default
LiveWhen each shape actually wins5 min
  • One Big Table wins when the team is small, questions are stable, and the BI tool (or the analysts) hate joins. Modern columnar engines make the width nearly free to store - column pruning means unused columns cost nothing to query. It loses when dimensions change (update every row?), when grain questions get subtle, and when five OBTs quietly disagree about what "revenue" means.
  • Data Vault wins in large, multi-source integration programs: hubs hold business keys, links hold relationships, satellites hold attributes with full history - extremely auditable and parallel-loadable. It loses on query ergonomics so completely that every Vault shop builds star schemas on top for analysts. It is a back-room organizing system, not a serving layer.
  • Star remains the default because it balances all of it: understandable grain, reusable conformed dimensions, one-join queries, SCD history where needed. Kimball's shape has survived every platform shift since the 90s - including this one; lakehouse tables are very often star-shaped Parquet.
Real world

The common hybrid. Many mature teams run star schemas as the modeled core, then publish a few OBTs AS marts (b7 thinking) for specific dashboards - the OBT is generated FROM the star, so definitions stay single-sourced. You will build exactly that in the self-study exercise below.

Part 3 · the engine you already have

DuckDB: the modern stack's Swiss knife 4 min live

Here is the quiet superpower of the engine you have used all course: DuckDB queries Parquet files directly - SELECT ... FROM 'file.parquet', no import step. That is external-table thinking: the data lives OUTSIDE the engine as open files, and SQL runs on top. Point it at a laptop file, an S3 URL, or a lake folder, and it is the same query. The lakehouse pattern, minus the cluster - and it is why DuckDB became the modern stack's favorite local tool for pipeline dev, testing, and ad hoc analysis.

Self-studyExternal tables in the big engines2 min read
  • Snowflake: external tables and Iceberg tables read lake files in place; regular tables use its managed storage.
  • BigQuery: external tables over GCS files, BigLake for the governed version.
  • Databricks: everything is Delta files on object storage - the lakehouse pitch in its purest form.
  • The shared idea: storage and compute are separate purchases. Files are the contract between them - which is exactly what you are about to exploit in Demo 1.
Demo 1 of 2

The Parquet round trip, live ★ 10 min · everyone builds

Time to touch the thing. This script writes Daybreak's orders to a real Parquet file - columnar bytes, compression, metadata and all - then queries the FILE, not the table. It all happens inside your browser tab's private filesystem: nothing uploads anywhere.

Run the script. Statement 1 writes daybreak_orders.parquet; statement 2 reads it back with a plain FROM - note the quotes: that is a file path, not a table name.

Change the second query - group by channel instead, or add a date filter. Every ordinary SQL move works on the file.

Now say what just happened: this file could sit in S3 and be a "data lake". An engine querying it in place is the lakehouse mechanic. You just did both in a browser tab.

Bonus: wrap the file query in EXPLAIN - the scan node reads the Parquet file directly, with b8's column pruning intact, because Parquet is columnar too.

COPY (SELECT * FROM orders)
TO 'daybreak_orders.parquet' (FORMAT PARQUET);

SELECT status,
       count(*) AS orders
FROM 'daybreak_orders.parquet'
GROUP BY status
ORDER BY orders DESC;
Real world

Why this is the industry's favorite handshake. "Send me the data" increasingly means "drop Parquet in the bucket". The file carries its own schema and types (no CSV guessing), compresses hard, and every engine - Snowflake, BigQuery, Spark, pandas, DuckDB - reads it natively. It is the CSV of the modern stack, minus the tears.

Demo 2 of 2

Export the mart: warehouse out, lake in ★ 12 min · everyone builds

Now the professional version: export a finished, modeled answer FROM the star schema TO an open file - the exact move a warehouse makes when it publishes data for ML jobs, partners, or another engine. Your star from b3-b7 is pre-built in these boxes.

Run the export below: a b7-style monthly-revenue mart query, written straight into monthly_revenue.parquet, then read back. Two statements, one published dataset.

Notice what got exported: not raw rows - a governed, modeled ANSWER. Publishing curated marts as files is how warehouses feed the rest of the stack without handing out database logins.

Your turn in the second box: export the whole fact table and query the FILE with a join back to dim_product - proving a Parquet file can sit in a star join like any table.

COPY (
  SELECT d.year, d.month, d.month_name,
         ROUND(SUM(f.line_revenue), 0) AS revenue
  FROM fct_order_line f
  JOIN dim_date d ON f.date_key = d.date_key
  WHERE f.status = 'completed'
  GROUP BY d.year, d.month, d.month_name
) TO 'monthly_revenue.parquet' (FORMAT PARQUET);

SELECT *
FROM 'monthly_revenue.parquet'
ORDER BY year, month;
LiveYour turn: a Parquet file inside a star join5 min

Runs as written - then make it yours: change the grouping to p.roast, or filter to one channel. The point to feel: the file participates in the join exactly like a warehouse table.

COPY (SELECT * FROM fct_order_line)
TO 'fct_order_line.parquet' (FORMAT PARQUET);

SELECT p.category,
       ROUND(SUM(f.line_revenue), 0) AS revenue
FROM 'fct_order_line.parquet' f
JOIN dim_product p ON f.product_key = p.product_key
WHERE f.status = 'completed'
GROUP BY p.category
ORDER BY revenue DESC;
Self-studyBuild the One Big Table and feel the tradeoff6 min

Part 2 made the OBT argument in words; make it in SQL. One CTAS flattens the fact and all three dimensions into a single wide table, then counts what you built:

CREATE TABLE obt_order_line AS
SELECT f.order_id, f.quantity, f.unit_price, f.line_revenue,
       f.status, f.channel,
       d.date_key, d.year, d.month, d.month_name, d.is_weekend,
       c.name AS customer_name, c.city, c.country, c.plan,
       p.name AS product_name, p.category, p.roast
FROM fct_order_line f
JOIN dim_date d     ON f.date_key = d.date_key
JOIN dim_customer c ON f.customer_key = c.customer_key
JOIN dim_product p  ON f.product_key = p.product_key;

SELECT count(*) AS row_count,
       (SELECT count(*) FROM information_schema.columns
        WHERE table_name = 'obt_order_line') AS column_count
FROM obt_order_line;

Now the tradeoff, out loud: 18 columns, no joins - lovely for a BI tool. But city is repeated on every line Ava ever ordered, so when she moves, an UPDATE has to find them all (the star changed ONE dim row in b5). And if marketing builds a second OBT with a slightly different refund filter, "revenue" now has two definitions. Generate OBTs FROM the star; never let them become the source of truth.

Homework

Try it yourself - this week ◐ 20-30 min total

Source material

Official sources covered

This page covers the architecture-landscape material of the source curricula - with the lakehouse's core file mechanic executed live instead of diagrammed. This page covers:

IBM Data Warehouse Fundamentals - Module 1: data lakes & lakehousesPart 1 + Demo 1 · the convergence story, run for real on Parquet
DeepLearning.AI Data Engineering C4 - M1: Data Vault & One Big TablePart 2 + OBT self-study build · when each beats Kimball, when not
365DS Intro to Data Warehousing - S7: warehouse vs lakehouseParts 1 + 3 · plus the which-should-you-run decision card
LinkedIn Learning Intro to Data Warehouses - "when not to go dimensional"Part 2 · the honest boundaries of the star schema
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · A vendor says "we're a lakehouse". What are they actually claiming?

The lakehouse is the merger: lake economics and openness, warehouse reliability and SQL. Table formats over Parquet are the standard implementation.

2 · Why did Parquet - not CSV - become the modern stack's exchange format?

Parquet carries the warehouse's whole b1+b8 playbook - columns, compression, zonemap-style metadata, types - inside a portable file every engine reads.

3 · When does One Big Table genuinely beat a star schema?

OBT trades update-friendliness and single definitions for zero-join convenience. That trade wins in small, stable, tool-constrained settings - especially as a mart layer over a star.

Builder session 9 cheat sheet · pin this

LakeCheap storage for raw files of any shape. Flexible; becomes a swamp without discipline.
LakehouseOpen files + warehouse table behavior (schemas, transactions, SQL). One copy, many engines.
ParquetColumnar FILE format with schema + min/max metadata inside. A warehouse layer you can email.
Iceberg / DeltaTABLE formats over Parquet files: transactions, schema evolution, time travel. The lakehouse's glue.
External-table thinkingData lives outside the engine as files; SQL runs on top. FROM 'file.parquet' is the whole idea.
One Big TableEverything flattened, zero joins. Fine as a generated mart; dangerous as the source of truth.
Data VaultHubs + links + satellites for huge multi-source programs. Back room only - stars still serve analysts.
Honest defaultStar for Daybreak-sized problems. The lakehouse changed where tables live, not what good models look like.