Part 3 · 1 chapters · ~8 min

Warehouses and Lakehouses

Cloud data warehouses (BigQuery, Snowflake, Redshift), data lakes on object storage, lakehouses with open table formats (Iceberg, Delta Lake, Hudi), catalogues, separation of storage and compute, partitioning and clustering, cost models, and choosing for a small company versus a large one.

5

Warehouses, lakes, lakehouses

warehouselakelakehouse
storagemanaged, proprietary formatfiles in object storageopen files + table format
transactions and schemayesno (files only)yes (Iceberg, Delta)
enginesthe vendor'sany, but no guaranteesmany, on the same tables
good forSQL analytics, BI, simple operationsraw, semi-structured, ML databoth, at scale, without lock-in

Choosing: a small company is usually best served by a managed warehouse (or ClickHouse, or even DuckDB on Parquet in object storage) plus dbt. Lakehouses pay off with large volumes, several engines, and ML workloads. Cost models differ: BigQuery on-demand bills by bytes scanned, so partitioning and selecting few columns cut the bill directly.

code
-- BigQuery: partition and cluster so queries scan less (and cost less)
CREATE TABLE analytics.transfers PARTITION BY DATE(created_at) CLUSTER BY account_id AS SELECT * FROM staging.transfers;
A LAKEHOUSE, LAYER BY LAYER
open files, a table format, and engines on top
object storageS3, GCS, R2: cheap, durable, unlimitedfile formatParquet filestable formatIceberg, Delta Lake, Hudi: snapshots, schema, ACIDcataloguewhich tables exist, where their metadata livesenginesSpark, Trino, DuckDB, Snowflake, ClickHouse read the same tables
swipe the figure sideways, or tap expand for full screen
1/4
object storage
Data lives in cheap object storage, separate from compute, so storage and compute scale and bill independently.
storage separated from computecheap and durable