Databricks DE Β· Topic 1.1

What a Lakehouse Is

One platform that combines the cheap, open storage of a data lake with the reliability and fast queries of a data warehouse β€” one copy of data for BI and ML.

Built on Delta Lake + Unity Catalog one copy: BI + ML

The one-liner

"A data management system that combines the benefits of data lakes and data warehouses" β€” delivered on Databricks as the Data Intelligence Platform, built on Delta Lake (storage) + Unity Catalog (governance).
🧭 Analogy: a warehouse is a tidy library (fast, but few formats); a lake is a cheap warehouse of unlabeled boxes (holds anything, hard to trust). A lakehouse is that cheap warehouse with a librarian + catalog bolted on β€” keep everything, still find and trust it.

Warehouse vs Lake vs Lakehouse

β–Έ click a tab to compare

Data Warehouse β€” fast BI & reliable, but expensive, often proprietary formats, and weak for ML on raw data.
  • βœ… ACID, fast SQL, governance
  • ❌ High cost, limited ML, closed formats
Data Lake β€” cheap, open, holds any data, great for ML β€” but no transactions and unreliable for BI.
  • βœ… Low cost, open formats, ML-friendly
  • ❌ No ACID, weak governance, unreliable queries
Lakehouse β€” the combination: cheap open storage plus warehouse-grade reliability and governance.
  • βœ… Low cost + ACID + fast SQL + ML + Unity Catalog governance
  • ⚠️ Needs Delta + Unity Catalog to deliver this β€” plain files alone = just a lake
WarehouseLakeLakehouse
Storage costHighLowLow
ACID / reliabilityYesNoYes
Fast BI SQLYesWeakYes
ML on raw dataWeakYesYes
GovernanceStrongWeakStrong (UC)

How it works β€” deep dive

1 Β· The problem β€” the two-system split

Mechanism: classically you kept a lake (cheap, open, ML) and a separate warehouse (fast BI, ACID), with ETL copying lake β†’ warehouse. Why it hurts: two copies, an extra ETL hop, staleness, drift, double cost/governance.

# The old two-system pain (what the lakehouse removes):
S3/ADLS lake (raw, ML)  --nightly ETL copy-->  Warehouse (BI)
   ^ one copy of truth                              ^ a second, stale copy
   = extra pipeline, drift, double storage + double governance

2 Β· The lakehouse idea β€” one open storage layer

Mechanism: keep data once in cheap object storage in an open table format (Parquet managed by Delta), and run both BI SQL and ML on it β€” no warehouse copy. Trade-off: you must adopt Delta + UC; plain files = just a lake.

-- One governed table in open format β€” BI and ML both read THIS, no copy.
CREATE TABLE main.sales.orders (
  order_id BIGINT, region STRING, amount DECIMAL(10,2), order_ts TIMESTAMP
) USING DELTA;                     -- Delta is the default format on Databricks

3 Β· The enabler β€” an open table format with a transaction log

Mechanism: Delta wraps Parquet with a transaction log adding ACID, schema enforcement, and version history β†’ lake storage that behaves like a warehouse table. Trade-off: the log enables time travel but old versions cost storage until VACUUM.

-- The transaction log gives reliability + time travel for free:
DESCRIBE HISTORY main.sales.orders;                 -- every versioned commit
SELECT * FROM main.sales.orders VERSION AS OF 3;    -- read as of version 3

4 Β· Governance & decoupled compute β€” Unity Catalog

Mechanism: Unity Catalog governs every table/file/model with the 3-level namespace catalog.schema.table + lineage + grants. Compute is decoupled β€” Spark, Photon, SQL warehouses read the same data, scaled independently. Trade-off: set-up cost, but one model for the whole estate.

-- One governance model over the single copy; engines read the same table.
GRANT SELECT ON TABLE main.sales.orders TO `analysts`;   -- UC access control
-- A SQL warehouse, a Spark job, and an ML notebook all query main.sales.orders.

5 Β· One copy β†’ BI and ML together

Mechanism: the same governed Delta table serves a BI dashboard (SQL) and a model (DataFrame) β€” no export, no second system. Trade-off: analytical sweet spot β€” for high-frequency single-row OLTP use an operational store (e.g. Lakebase).

# BI: SELECT region, sum(amount) FROM main.sales.orders GROUP BY region
# ML reads the SAME table β€” no copy into a separate system:
df = spark.read.table("main.sales.orders")           # one source of truth
features = df.groupBy("region").sum("amount")         # same data BI reports on

How it works β€” the stack

β–Έ click each layer to expand

β‘  Cloud object storage (S3 / ADLS / GCS)πŸ—„οΈ
Your data sits in cheap cloud storage in open formats (Parquet under Delta) β€” not a proprietary warehouse format.
β‘‘ Delta Lake β€” reliable table layerπŸͺ¨
Adds ACID transactions, schema enforcement, and version history on top of those files β†’ lake storage that behaves like a warehouse table.
β‘’ Unity Catalog β€” governanceπŸ›‘οΈ
One governance layer over every table, file, and AI asset using catalog.schema.table, with lineage and fine-grained access control.
β‘£ Decoupled compute (Spark Β· Photon Β· SQL warehouses)βš™οΈ
Engines read the same governed data; scale compute independently of storage. BI, ETL, streaming, and ML all hit one copy.

Why it matters

🏬 Real-world use case: a retailer lands raw clickstream + orders in cheap cloud storage, refines it in place, and serves the same tables to a BI dashboard, a forecasting model, and ad-hoc SQL β€” no separate warehouse to copy into.

Uses, edge cases & limitations

Common gotchas