Overview
One definition, every consumer
A semantic layer is the layer of software between your warehouse and everything that reads from it. It does three jobs:
- Names the business vocabulary — entities (
Customer,Order), measures (revenue,order_count), dimensions (country,product_line,week). - Maps that vocabulary to physical SQL — the
revenuemetric isSUM(orders.amount_cents)/100, joined tocustomersoncustomer_id. - Compiles consumer queries against the vocabulary into warehouse-native SQL on demand — Snowflake, BigQuery, Databricks, Postgres.
The leverage: every consumer (Looker, Hex, Streamlit, an embedded app, an LLM agent, a Slack bot) reads the same definitions. 'Revenue' means one thing across the company.
Without a semantic layer
Each tool re-writes its own SQL. Marketing's dashboard says $2.3M; Finance's says $2.1M; the CEO loses faith in both. Three months are spent reconciling the difference, only to find one excluded refunds and the other excluded VAT.
Where it sits
Sources → Warehouse (Snowflake/BigQuery/Databricks)
→ dbt models (raw → staging → marts)
→ SEMANTIC LAYER ← *this track*
→ Consumers (BI, notebooks, apps, LLMs)
It is not a warehouse, not a dashboard tool, not a metrics dashboard product — it is the typed contract between warehouse and consumer.