Data governance
14 min

What Is a Semantic Layer?

Key takeaways

  • A semantic layer is the governed record of what a business's data means: its concepts, its metrics, the mapping from each to the physical data, and the entitlements on each, held once and served to every tool and AI agent.
  • Two problems, one name. A metrics layer solves the dashboard problem by defining each calculation once. The agent problem starts earlier, with what a customer is, and a formula store cannot answer it.
  • The vendor documentation agrees in its own words: warehouse-native semantic views and metric views define facts, dimensions and measures over logical tables. They are metrics layers wearing a bigger name.
  • Ownership is part of the layer. One named owner per definition, a version, a review date and a SHACL validation rule turn a definition into something an agent can cite or refuse.
  • The semantic layer that holds up for AI is built on an ontology, on open standards, with the definition and the calculation on the same governed asset and entitlements evaluated on the meaning at query time.
In this article
Share

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.

What is a semantic layer?

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.

The four things a semantic layer holds

PartThe question it answersExample
ConceptsWhat is a thing?A customer is a party with at least one billed account, as defined by Finance
MetricsHow much, and how is it computed?Net revenue is gross revenue less discounts, summed by period
MappingsWhere does this live?Customer resolves to crm.account and to dw.cust_dim, each mapping approved
Rules and entitlementsWhat 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.

What problem does a semantic layer solve?

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.

Two problems, two layers

The dashboard problemThe agent problem
Who asksA person, through a BI toolA 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 layerThree numbers for one metricA plausible query over the wrong concept, returned with confidence
What the layer must holdMetric definitions and dimensionsConcepts, 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.

What does a semantic layer contain?

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 parts, and who owns each

  • Concepts. The business objects: customer, account, product, trade. Owned by the business domain, written in a model a machine can read.
  • Properties and relationships. What a concept has and how concepts connect, so a join path is a modelled fact and never a guess.
  • Metrics. Calculations over concepts, with the aggregation and the filters that make them correct. Owned by the function that reports them.
  • Dimensions. The attributes a metric can be grouped by, drawn from the concepts and their properties.
  • Mappings. The link from each concept and metric to the physical tables and columns, held as data you can query and audit.
  • Owners, versions, and dates. A named person per definition, a version history, and a review date, so a consumer can tell a current definition from a stale one.
  • Validation rules. The tests a record must pass to count as an instance of the concept. They are written in SHACL, the W3C Shapes Constraint Language, so they run on the data.
  • Entitlements. Access rules attached to the concept, evaluated at query time against the identity of whoever, or whatever, is asking.

The first, sixth, and seventh parts are the ones a metrics layer leaves out, and they are the ones an agent needs first.

Where does a semantic layer sit in the stack?

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.

What each consumer takes from the layer

ConsumerWhat it asks forWhat breaks without the layer
BI dashboardA metric by a dimensionEach workbook re-implements the formula
SQL notebookThe approved join path and filterEach notebook rediscovers the exclusions
AI agentThe concept, the permitted relationships, the metric logic, and the entitlementAn invented join over a column the agent inferred
Data catalogThe approved definition to display against each assetForty 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.

What is the difference between a metrics layer and a semantic layer?

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.

Where the two layers part

QuestionMetrics layerSemantic layer built on an ontology
What is net revenue?A formula over columns, defined onceThe same formula, attached to the concept it measures
What is a customer?A join keyA defined concept with properties, relationships, and a named owner
Which join paths are allowed?Whatever the model file declaresOnly the relationships the ontology models
Who approved this, and when?Git history, if anyone looksA steward, a date, and a version on the record
Is this record valid?UntestedChecked by a SHACL shape on every load
Who may see it?Row and column rules per modelRules 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.

Why does an AI agent need a semantic layer?

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.

What the agent needs before it asks for revenue

  • The concept. What a customer is, in a form the agent can resolve, with the scope in which that definition holds.
  • The permitted relationships. The join paths it may take, drawn from the model, so an invented join is unavailable.
  • The owner and the version. Who approved the definition and when, so the agent can cite it or decline an expired one.
  • The entitlement. What the person it acts for may see, evaluated at query time on the concept.
  • The metric logic. Last of the five, because every metric is a calculation over concepts someone defined first.

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.

What is the difference between a semantic layer and an ontology?

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.

One model, one layer

OntologySemantic layer
What it holdsConcepts, properties, relationships, and rulesThose concepts mapped to data, with metrics and entitlements attached
Who writes itDomain experts with a modellerData and analytics teams, on top of the model
StandardOWL and SKOS, validated with SHACLWhatever the serving layer speaks: SQL, SPARQL, an API, MCP
Question it settlesWhat 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.

How does a semantic layer relate to a knowledge graph?

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.

Three statements that hold

  • A semantic layer can be served from a graph. The ones built on an ontology usually are, because the meaning is already a graph.
  • Owning a graph does not give you a semantic layer. A graph with no owners, no validation, and no mapping to the warehouse is a structure. The layer is a set of governed answers.
  • The storage question is separate. Our post Knowledge Graph vs. Graph Database answers it.

Our post Semantic Layer vs Knowledge Graph: Where Meaning Lives and Where It Is Stored draws the line in full.

Is a semantic layer the same as a context layer?

"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.

Is a semantic layer the same as a semantic model?

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.

The short version

  • Semantic model. A BI-embedded data model with measures and relationships, owned by the report team, readable by that tool.
  • Semantic layer. The tool-independent record of meaning that semantic models, notebooks, and agents all read from.
  • The relationship. A well-run semantic model takes its definitions from the semantic layer and adds presentation.

Is a semantic layer the same as a data catalog?

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.

Keep the catalog

  • The catalog stays. Discovery and breadth are what it does well, and nothing in this guide asks you to give them up.
  • Meaning lives above it. The governed definition, with its owner and its validation rule, sits in the semantic layer.
  • The catalog syncs. It displays the approved definition against each asset and stops being the place where meaning is invented.

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?.

Who owns a definition in a semantic layer?

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.

One governed record: net revenue

FieldContentWhy a machine needs it
ConceptNet revenue is a measure of the Order conceptTies the number to the thing it measures
DefinitionGross order value less discounts and refunds, in the order currencyThe sentence a tool or an agent quotes
CalculationSUM(gross_amount - discount - refund), grouped by any Order dimensionThe formula every consumer runs
OwnerA named person in Finance, with a successor on fileResolves a disagreement to a person
Status and datesApproved 2026-03-14, review due 2027-03-14, version 3Lets a consumer refuse an expired definition
Mappingserp.sales_order and dw.fct_order, each mapping proposed by automation and approved by the ownerCloses the gap between the word and the column
ValidationA SHACL shape: every Order has exactly one currency and a non-negative gross amountTurns the definition into a test
EntitlementVisible to Finance and Sales roles; refund detail to Finance onlyEvaluated 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.

How do you build a semantic layer?

The order matters more than the platform. A program that starts with the metrics file automates the existing confusion.

The sequence, in order

  1. Pick the disputed concepts. Customer, account, product, and the five metrics that cause the most meetings.
  2. Model the concepts. Express them, their properties, and their relationships in OWL and SKOS. Start from a published standards-based model where one exists.
  3. Attach the metrics. Define each calculation on the concept it measures, with its scope and its dimensions.
  4. Map to the physical estate. Let automation propose the column mappings with a score. An owner approves each one before it becomes authoritative.
  5. Assign owners and validation. A named steward per definition, a review date, and a SHACL shape that tests the data against the definition on every load.
  6. Serve it. One governed record, served over SQL, an API, SPARQL, and MCP, with the owner, the version, and the entitlement attached to every answer.
  7. Sync the catalog and the BI models. Each one displays and consumes the approved definition and stops minting its own.

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.

Where does TopQuadrant fit?

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.

Give your AI the context it's been missing

See how the TQ Data Foundation turns your enterprise knowledge into trusted, Al-ready context.