Warehouse Architecture
Where cleaned, queriable truth lives
A data warehouse separates storage from compute, organizes data by subject, and gives business analysts an SQL surface over clean, versioned, governed data.
What you will learn
- Describe the warehouse's role between sources and dashboards
- Contrast warehouse, database, and data lake responsibilities
- Explain why storage/compute separation changed the economics
What is this?
A warehouse is a managed, SQL-queryable store for large amounts of cleaned, aligned, versioned data. It separates storage from compute so you can scale queries independently of data size, and gives analysts one governed surface instead of many bespoke databases.
Why do you need it?
- Business decisions read from one consistent picture, not five divergent dashboards.
- Clean, modeled data drops the time from 'ingest' to 'report that can be trusted'.
- The architecture drives the rest of this module: dimensional modeling, SCDs, and incremental loads.
Mental model
A city water plant
A data warehouse
Reservoirs (sources) feed a treatment process (modeling); clean water is piped to every faucet (dashboard/BI). Everyone drinks from the same treated system rather than bottling swamp water per household.
How it works
- Sources land raw data via ELT pipelines into staging or raw layers (often a lake or stage tables).
- Modeling transforms stage data into conformed facts and dimensions that a BI tool can join.
- Storage and compute are decoupled: you pay/scale for queries without copying the dataset.
- Time travel and versioning let analysts re-run historical queries without a restore.
- Access control, lineage, and freshness SLAs wrap the surface that analysts actually see.
Layers of a modern warehouse architecture.
Examples
The seam the warehouse owns
-- Analysts see THIS (modeled, governed):SELECT d.region, f.amount FROM fact_sales fJOIN dim_customer d ON f.customer_key = d.customer_keyWHERE f.sold_date >= '2026-01-01'; -- Engineers own the pipeline that created fact_sales:INSERT INTO fact_salesSELECT ... FROM raw_orders o JOIN dim_customer d ON o.cust_id = d.source_id;The warehouse is the contract: analysts query modeled tables; engineers own how those were built and kept fresh.
In production
- A finance org runs all P&L from a single fact table, so the CFO sees the same numbers as the pivot analysis.
- Product analytics joins event and subscription dimensions in one SQL surface instead of merging CSVs.
- A data team adds compute capacity for a dashboard spike without duplicating data or re-ingesting.
Best practices
- Layering raw → staging → modeled keeps reversible, auditable transformations.
- Model to subject, not to dashboard: one conformed schema serves many reports.
- Encode freshness and quality expectations into the warehouse's SLOs.
Common mistakes
- Modeling directly for one expensive dashboard and hardening the wrong grain.
- Treating the warehouse as a cache for source tables instead of a modeled layer.
- Ignoring governance until two teams embed conflicting definitions.
Debugging tips
- When dashboards disagree, check whether they read from raw vs modeled layers.
- A missing day after a nightly load is almost always a pipeline watermark or SLA, not data loss.
- EXPLAIN on a big join tells you whether the query or the model is the cost.
Interview checkpoint
Quick quiz
The warehouse's core product is…
Storage/compute separation means scaling query capacity can be done without copying data.