Ask three teams for last month's "active customers" and you often get three numbers. One counts logins, one counts orders and one excludes trial accounts. Each figure is defined in a different dashboard's SQL. A semantic layer moves those definitions into one place that every tool reads from.
What it contains
A semantic layer describes the warehouse in business terms:
- Metrics: revenue, active customers, churn rate, with the exact aggregation and filters.
- Dimensions: the ways you can slice a metric, such as date, region or plan.
- Entities and joins: how orders relate to customers and products, so tools don't guess join keys.
- Grain and time rules: whether a metric is daily or monthly, and which date it uses.
- Access rules: who may see which rows and columns.
A tool asks for "net revenue by region for October". The semantic layer writes the SQL, runs it on the warehouse and returns the result. The dashboard never holds the formula.
Example: one definition of net revenue
An illustrative definition, in the YAML style most tools use:
metric: net_revenue
description: Paid order value minus refunds, excluding cancelled orders
table: fct_orders
expression: sum(total_paise) - sum(refund_paise)
filter: status != 'cancelled'
time_dimension: paid_at
dimensions: [region, channel, plan]
The finance dashboard, the weekly email and the "ask your data" chatbot all request net_revenue. When finance decides to exclude shipping charges, one line changes and every consumer picks it up. Before this, the same change meant finding and editing every report that had its own copy of the formula.
Why it matters for AI
A language model writing SQL against raw tables guesses which tables, joins and filters you mean, and it can guess differently each time. This is a common source of confident but wrong answers, a data version of AI hallucination. With a semantic layer, an AI agent picks from named metrics and dimensions, and the layer generates the SQL. The agent can answer fewer kinds of question, but its numbers match finance's. Our data and analytics outlook covers this trend.
Common tools
- dbt Semantic Layer, powered by MetricFlow. dbt Labs released MetricFlow under the Apache 2.0 licence in October 2025.
- LookML in Looker.
- Power BI semantic models. Microsoft renamed Power BI "datasets" to "semantic models" in November 2023.
- Cube, an open-source "headless BI" semantic layer with SQL and REST APIs.
- Warehouse-native options from Snowflake and Databricks.
In September 2025, Snowflake, dbt Labs, Salesforce and others started the Open Semantic Interchange (OSI). It is an open specification for moving semantic definitions between tools, so a metric defined once can be read by several BI and AI products.
Common mistakes
- Defining metrics in the BI tool's own layer and then adding a second layer elsewhere, which recreates the problem.
- Modelling every column instead of the 20 to 50 metrics people actually ask about.
- Skipping tests. A semantic layer over broken ETL output just serves wrong numbers consistently.
We build metric layers and AI analytics on top of them through our data and AI work.