Semantic Layer vs Metrics Layer
Often used as synonyms, but one is a part of the other.
A metrics layer defines metrics once (revenue, active users, conversion rate) so every tool computes them the same way. A semantic layer is broader: it maps business concepts such as customers, orders, and their relationships onto warehouse tables, and the metrics layer is one part of it. Most modern tools, including the dbt Semantic Layer, Cube, and Looker's LookML, are semantic layers that include metric definitions.
On this page · 6 sections
- Option A
- Semantic layer
- Option B
- Metrics layer
- Compared on
- 5 dimensions
- Goes deeper in
- Data Modeling
The terms overlap because the products overlap. When people say metrics layer, they usually mean the problem being solved: three dashboards showing three different revenue numbers. When they say semantic layer, they usually mean the whole model that solves it.
A metric needs more than a formula. To compute revenue by customer segment, the tool also has to know which table holds orders, how orders join to customers, what a segment is, and which time column to use. That surrounding model of entities, dimensions, and joins is the semantic layer. The metric definitions sit on top of it.
| Aspect | Semantic layer | Metrics layer |
|---|---|---|
| Defines | Entities, dimensions, joins, measures, and metrics | Metrics: aggregation, filters, time grain |
| Scope | The business model of the data | One part of that model |
| Answers | What is a customer and how does it relate to orders? | How exactly is monthly revenue calculated? |
| Examples | dbt Semantic Layer, Cube, LookML, AtScale | Metric definitions in MetricFlow, Cube measures, LookML measures |
| Built on | Fact and dimension tables in the warehouse | The semantic layer's entities and dimensions |
Think in semantic-layer terms when
- Several tools (BI, notebooks, spreadsheets, AI assistants) need the same business definitions.
- Users should be able to slice metrics by dimensions without writing joins.
- You are deciding where business logic lives: in BI tools or next to your dbt models.
Start with metric definitions when
- The urgent problem is a handful of key numbers that disagree across reports.
- Your warehouse already has clean fact and dimension tables to build on.
- You want a small first step before modeling every entity.
Treat the metrics layer as part of the semantic layer rather than an alternative to it. In practice, start with the five to ten metrics leadership argues about, define them once next to your models, and grow the semantic model around them.
Either way, the foundation is the same: well-modeled fact and dimension tables with a clear grain. A semantic layer cannot fix a fact table that double-counts.
- Is the dbt Semantic Layer a metrics layer?
- It is a semantic layer that includes metrics. You define semantic models (entities, dimensions, and measures) on top of dbt models, then define metrics with MetricFlow, and tools query those metrics through dbt's APIs.
- Do I need a semantic layer if I use one BI tool?
- Not always. A BI tool's own modeling layer, such as LookML or a Power BI semantic model, can play that role. A separate semantic layer pays off when several tools need the same definitions.
Go deeper in the Data Modeling hub.
