A semantic layer is where a business writes down what its data means, in a form every tool can read. It sits between the warehouse and the things that query it: dashboards, notebooks, applications, and AI agents. It holds the agreed definition of each concept and each metric. It holds the mapping from that definition to the physical columns, and the rules about who may see what. Most semantic layers on the market stop at metrics. They define revenue, margin, and churn once, so every dashboard computes them the same way. That solves the dashboard problem. An AI agent has a different problem, and this guide covers both.
The phrase predates the cloud warehouse and the thing it names has changed three times. It began as the business layer inside a BI tool. It became a metrics store outside any one tool. Now it is being asked to tell an agent what a customer is. Some people say semantic data layer. It is the same thing.
A semantic layer is the governed record of what a business's data means. It holds the concepts, the metrics, the mapping from each to the physical data, and the entitlements on each. It is held once, owned by named people, and served to every consumer, including AI agents.
A semantic layer translates technical structures into the terms the business uses. A column named cust_id is mapped to the concept "Customer". A calculation buried in SQL becomes the agreed definition of "Net revenue". The ownership, usage, and validity rules attach to the concept, and every consumer reads the same record. That much is common to every definition on the market.
| Part | The question it answers | Example |
|---|---|---|
| Concepts | What is a thing? | A customer is a party with at least one billed account, as defined by Finance |
| Metrics | How much, and how is it computed? | Net revenue is gross revenue less discounts, summed by period |
| Mappings | Where does this live? | Customer resolves to crm.account and to dw.cust_dim, each mapping approved |
| Rules and entitlements | What counts as valid, and who may see it? | Every customer has exactly one billing account; salary fields resolve only for HR roles |
The products most people meet first describe the second and third rows. dbt's introduction to the subject (published 2024-07-16, updated 2026-05-04) calls a semantic layer "a framework that allows organizations to create a unified, business-friendly representation of their data". Its four elements are data sources, data models, "metrics definitions", and endpoints (dbt Labs). Cube's explainer (published 2026-06-14, updated 2026-10-02) says the layer "holds the definitions of your business". It lists them: "what each metric means, the dimensions you slice by, the join paths that connect your tables, and the access rules that decide who sees what" (Cube). Both are accurate about what those products hold. The first row of the table is missing from both. It is the row this guide is about.
There is a meeting most data leaders recognise. Finance reports one revenue number. Sales reports another. The meeting settles nothing, because the disagreement was never about the data. It was about what "revenue" means in each department. A semantic layer ends that meeting by holding one definition that every tool computes from.
That is the dashboard problem, and the metrics layers of the last decade solved it well. The second problem arrived with AI agents. An agent does not open a dashboard. It composes a query from whatever has been written down for a machine. Before it can ask for revenue it has to know what a customer is, which customers count, and which tables it may join. A store of metric formulas has no answer, so the agent guesses.
| The dashboard problem | The agent problem | |
|---|---|---|
| Who asks | A person, through a BI tool | A model, through an API or MCP server |
| What they ask | "Revenue by region, last quarter" | "Which customers are at risk?" and, first, "what is a customer?" |
| What fails without a layer | Three numbers for one metric | A plausible query over the wrong concept, returned with confidence |
| What the layer must hold | Metric definitions and dimensions | Concepts, relationships, owners, entitlements, and metrics |
Our post Semantic Layer, Data Fabric, Data Mesh, Context Layer: Is Any of This New? answers the obvious objection, which is that the substrate here is decades old. It is. What changed is the consumer, and that is why the layer has to carry more than it used to.
A semantic layer that holds up for both problems has eight parts. Each has a natural owner, and the owner is part of the layer.
The first, sixth, and seventh parts are the ones a metrics layer leaves out, and they are the ones an agent needs first.
The layer sits above storage and below every consumer. The warehouse keeps the data. The layer keeps the meaning. Each consumer asks the layer for a definition and gets the same answer.
| Consumer | What it asks for | What breaks without the layer |
|---|---|---|
| BI dashboard | A metric by a dimension | Each workbook re-implements the formula |
| SQL notebook | The approved join path and filter | Each notebook rediscovers the exclusions |
| AI agent | The concept, the permitted relationships, the metric logic, and the entitlement | An invented join over a column the agent inferred |
| Data catalog | The approved definition to display against each asset | Forty descriptions of one term, none of them authoritative |
Products in this space fall into four categories: BI-embedded models, warehouse-native views, standalone metrics layers, and layers built on an ontology. Our post Semantic Layer Tools: Metrics Layers, Native Views and Meaning Layers Compared places the named products in those categories.
A metrics layer can define a calculation. It cannot define a concept. The vendor documentation agrees in its own words. Snowflake's overview of semantic views, read on 2026-11-22, says that within a semantic view "you define logical tables that typically correspond to business entities, such as customers, orders, or suppliers". Facts, metrics, and dimensions are then defined over those tables. The same page states that "Semantic views are considered metadata" (Snowflake documentation). Databricks, read the same day, describes Unity Catalog metric views as working "by separating measure definitions from the fields (also called dimensions) used to group, filter, and aggregate them" (Databricks documentation).
Those are exact descriptions of useful products. A logical table named "customers" is a pointer to a table. It says nothing about what a customer is, which records qualify, who decided, or when the decision expires. The calculation lives in the view. The concept lives in someone's head.
| Question | Metrics layer | Semantic layer built on an ontology |
|---|---|---|
| What is net revenue? | A formula over columns, defined once | The same formula, attached to the concept it measures |
| What is a customer? | A join key | A defined concept with properties, relationships, and a named owner |
| Which join paths are allowed? | Whatever the model file declares | Only the relationships the ontology models |
| Who approved this, and when? | Git history, if anyone looks | A steward, a date, and a version on the record |
| Is this record valid? | Untested | Checked by a SHACL shape on every load |
| Who may see it? | Row and column rules per model | Rules on the concept, evaluated per request |
Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes the two layers apart in full. It also answers the vendor line that a metrics layer is one component of a semantic layer. True, and it leaves out which component comes first.
An agent asks "what is a customer" before it asks "what is revenue". If the layer cannot answer the first question, the agent answers it by inference, and inferred context is a guess with good grammar. The measured evidence here comes from a metrics-layer vendor. dbt's benchmark "Semantic Layer vs. Text-to-SQL: 2026 Benchmark Update" (Jason Ganz and Benoit Perigaud, dbt Developer Blog, 2026-04-07) reports two pairs of figures for one of the two models tested. In-scope questions scored 100.0% through the dbt Semantic Layer and 62.5% through text-to-SQL. Out-of-scope questions scored 0.0% through the Semantic Layer and 70.0% through text-to-SQL. Their sentence on the second pair: "Text-to-SQL will cheerfully give you a wrong number" (dbt Developer Blog).
A refusal is worth a great deal. It is only safe when the definition the layer refused on was the agreed one. And "in scope" is only as wide as the concepts someone modelled. Our post Semantic Layer vs Text-to-SQL: What a Refusal Is Worth spends its length on that gap.
Our post A Semantic Layer for AI Agents: What the Agent Needs Before It Asks for Revenue covers each of the five. Our post Semantic Layer and MCP: What the Agent Actually Receives shows what a governed-meaning MCP server returns that a metrics MCP server cannot. The product side of this is on our agent-ready semantic layer page.
An ontology is the formal model of what the business's concepts are and how they relate. A semantic layer is the place that model meets the warehouse. There each concept is mapped to columns, measured by metrics, and served to tools. The semantic layer that holds up for AI is built on an ontology. The ones that stop at metrics are built on a model file with no concepts in it.
| Ontology | Semantic layer | |
|---|---|---|
| What it holds | Concepts, properties, relationships, and rules | Those concepts mapped to data, with metrics and entitlements attached |
| Who writes it | Domain experts with a modeller | Data and analytics teams, on top of the model |
| Standard | OWL and SKOS, validated with SHACL | Whatever the serving layer speaks: SQL, SPARQL, an API, MCP |
| Question it settles | What is a customer? | Where is a customer, and how much did they spend? |
Our post Semantic Layer vs Ontology: Which One Says What a Customer Is argues this from the warehouse side. It is written for a reader who would never search the word "ontology". For the word itself, our post What Is an Ontology? is the definition, our post Ontology vs. Data Model separates it from the schema, and our post What Is Ontology Management? covers keeping the model governed once it exists.
A knowledge graph is how the connected result is stored and queried. When the concepts, the mappings, the owners, and the lineage are held as one traversable structure, the semantic layer has a knowledge graph underneath it. The graph is the storage. The layer is the job.
Our post Semantic Layer vs Knowledge Graph: Where Meaning Lives and Where It Is Stored draws the line in full.
"Context layer" is the term many people search and link to for the job of serving agreed meaning to an AI system. We call that job context management, and the meaning it serves authoritative context. A semantic layer built on an ontology is the most-searched name for the thing a governed context serves. A metrics layer is one input to it.
The question has two halves. Our post Semantic Layer vs Context Layer: What Each Term Means and What We Call It Now takes the semantic-layer half. The graph half is already answered in our post Knowledge Graph vs Context Layer: How They Relate. The discipline behind both is in our post Context Management: The Complete Guide.
Usually the person asking this works in Power BI or Microsoft Fabric. There, "semantic model" is the name of a product object. Microsoft's documentation (dated 2025-10-01, updated 2026-04-28) says "Power BI semantic models represent a source of data that's ready for reporting and visualization". The same page notes that Microsoft "sometimes uses the terms semantic model and model interchangeably" (Microsoft Learn). So a semantic model is one tool's model of its own tables.
A catalog indexes assets so people can find them. Its unit of record is a table or a file. A semantic layer is organized around concepts, and one concept maps to many assets at once. A catalog can hold forty descriptions of "customer". It has no natural place for the one definition those forty are supposed to share.
Our post Metadata Management vs Data Catalog: Keep the Catalog, Govern the Meaning says which product should hold what. Our post Knowledge Graph vs Data Catalog: What Each One Solves covers the structural side. The discipline both sit inside is in our post What Is Metadata Management?.
One owner per definition. That rule does more for an AI program than any tool choice. A metric definition nobody approved is inferred metadata with a formula attached. An agent that resolves against it is citing a guess. Here is an owned definition, with the concept and the calculation on one record.
| Field | Content | Why a machine needs it |
|---|---|---|
| Concept | Net revenue is a measure of the Order concept | Ties the number to the thing it measures |
| Definition | Gross order value less discounts and refunds, in the order currency | The sentence a tool or an agent quotes |
| Calculation | SUM(gross_amount - discount - refund), grouped by any Order dimension | The formula every consumer runs |
| Owner | A named person in Finance, with a successor on file | Resolves a disagreement to a person |
| Status and dates | Approved 2026-03-14, review due 2027-03-14, version 3 | Lets a consumer refuse an expired definition |
| Mappings | erp.sales_order and dw.fct_order, each mapping proposed by automation and approved by the owner | Closes the gap between the word and the column |
| Validation | A SHACL shape: every Order has exactly one currency and a non-negative gross amount | Turns the definition into a test |
| Entitlement | Visible to Finance and Sales roles; refund detail to Finance only | Evaluated per request, for people and agents alike |
Automation can propose most of this record. A person with accountability approves it. Our post Ground Truth: SME-Approved vs Inferred Metadata covers what the approval adds. Our post What Is Data Governance for AI? covers who gets to be the owner and what the rules are when the consumer is a model.
The order matters more than the platform. A program that starts with the metrics file automates the existing confusion.
Our post How to Build a Semantic Layer: Platform-Neutral Steps and What Each Native Layer Leaves Out walks each step. It carries a table of what Snowflake semantic views, Databricks metric views, dbt MetricFlow, and Power BI semantic models each give you, and what each leaves for you to build.
TopQuadrant does not sell the dashboard, the warehouse, or the metrics file. TQ Data Foundation is the governed semantic layer those things read from. Our semantic layer use case page shows it.
Every metric carries its business definition, its owner, its calculation, and its mapping to physical columns. The plain-language meaning and the logic live on the same governed asset. Mappings from governed concepts to physical schemas are explicit assets you can query. A source change surfaces every affected concept, metric, and consumer. Entitlements attach to the governed concept and are evaluated per request, so an agent sees exactly what its caller may see. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, and MCP. AI proposes mappings and definitions; your experts confirm them. Every definition is validated with SHACL. The standards are open. TopQuadrant helped author SHACL and the RDF specifications, so the record is yours to export in full. We maintain 300 reusable standards-based models, so the work starts from governed structure. Your catalog stays, and it syncs.
That is what a semantic layer is when the consumer is an agent. A metrics layer defines the calculation. TQ Data Foundation defines the concept too, with a name on it.