Data governance
7 min

Semantic Layer vs Ontology: Which One Says What a Customer Is

Key takeaways

  • A semantic layer defines metrics and the dimensions they are grouped by. An ontology defines the concepts those metrics are about: what a customer is, what it has, how it relates to other concepts, and which records qualify.
  • In a metrics file a customer is a join key. dbt's own documentation says entities such as customers "serve as a join key across semantic models", and every entity type it lists is a kind of key.
  • An AI agent asks what a customer is before it asks for revenue. A metrics file has no answer, so the agent infers one from the column name, and inferred context is a guess with good grammar.
  • The competing pages agree with the distinction in their own words, then recommend building both and put the vendor's own product between them. None puts an owner, a version, and a validation rule on the concept.
  • The order is the argument. Every metric is a calculation over concepts someone defined first. Define the concept with an owner, attach the calculation to it, and hold both on one governed record.
In this article
Share

A platform lead at an insurer has a semantic layer. Revenue, loss ratio, and retention are defined once, in a metrics file, and every dashboard agrees. Then the first AI agent goes live, and its first question is one the file cannot answer: which records count as a customer? The semantic layer vs ontology question starts there, on the warehouse side, for people who never planned to search the word "ontology".

A semantic layer, as the market ships it, defines metrics and the dimensions you slice them by. An ontology defines the concepts those metrics are about: what a customer is, what it has, how it relates to a policy, and which records qualify. The first says how much. The second says what. An agent needs the second before it can trust the first.

A metrics file can say how much. It cannot say what. An ontology says what a customer is, who agreed that, and which records qualify. The semantic layer that holds up for AI is built on it, with the definition and the calculation on one governed record.

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

From the warehouse side the difference is the unit of record. A semantic layer's unit is a metric with its dimensions. An ontology's unit is a concept with its properties, relationships, and rules. In our post What Is a Semantic Layer? we set out the four things a layer has to hold. This article is about the first of them, the concept.

The difference, from the warehouse side

QuestionSemantic layer, as shippedOntology
What is the unit of record?A metric and its dimensionsA concept, with its properties, relationships, and rules
What is "customer" in it?A join key between logical tablesA class with a definition, a scope, and the records that qualify
Who can say it is wrong?Whoever reviews the pull requestA named owner, with a date and a version on the record
How is a rule tested?A test on a columnA SHACL shape (W3C Shapes Constraint Language), run on the data
What does an agent get?The formula and the declared joinsThe meaning, then the joins it may take, then the formula

What does a semantic layer say a customer is?

The answer is in the vendors' own documentation. dbt's page on entities (last updated 2026-07-20) opens with this: "Entities are real-world concepts in a business, such as customers, transactions, and ad campaigns." Then: "In our Semantic Layer models, these entities serve as a join key across semantic models." The four entity types it lists are primary, unique, foreign, and natural (dbt documentation). Every one of them is a kind of key.

That is an exact description of a useful product. The file can say that customer_id is the primary key of dim_customer. It cannot say whether a prospect with a quote and no policy is a customer, or whether a lapsed policyholder still is. The file holds the result of that decision and drops the reasoning.

What the metrics file holds about a customer

  • The key. The column that identifies a customer row, declared once so joins resolve.
  • The dimensions. Region, segment, and tenure, for grouping a metric.
  • The silence. Nothing on which records qualify, who decided, or when the decision expires.

Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes that file apart row by row. Ask the file what a customer is and it returns a column.

What does an ontology say a customer is?

An ontology is the formal model of a business's concepts, written so a machine can read it and a person can own it. Our post What Is an Ontology? defines it in full. Here is what the model holds about one concept.

Customer, as an ontology holds it

PartWhat the record saysWhy a warehouse team should care
ClassCustomer: a party that holds at least one policy that has been in forceThe sentence every customer metric rests on
PropertiesLegal name, primary contact, risk ratingThe columns a customer dimension may carry
RelationshipsA Customer holds a Policy; a Claim is made against a PolicyThe only join paths an agent may take
RuleEvery Customer holds at least one Policy; a Prospect holds noneA SHACL shape, so the data is tested against it on load
OwnerA named underwriter; approved 2026-03-14, version 3, review due 2027-03-14Who settles a disagreement, and when the answer expires
ScopeRetail lines; the commercial division models Customer as an OrganisationWhere the definition holds, and where another applies

A customer table is a data model, scoped to one system. The class above is scoped to the business, and the rule travels with it. Our post Ontology vs. Data Model draws that line. Keeping the model owned and current is the subject of our post What Is Ontology Management?.

Why does an AI agent ask what a customer is before it asks for revenue?

A dashboard user carries the concept in their head. An agent carries nothing. It composes a query from what was written down for a machine. If the layer holds customer_id and no definition, the agent infers one from the column name and the sample values. Inferred context is a guess with good grammar.

Three questions, in the order an agent asks them

  1. What is a customer? Answered by the ontology. A metrics file returns a key.
  2. Which customers, through which joins? Answered by the relationships in the model. A metrics file answers with whatever joins it declares.
  3. How much did they spend? Answered by the metric. Both layers can hold the formula. Only one attaches it to the concept it measures.

Our post A Semantic Layer for AI Agents: What the Agent Needs Before It Asks for Revenue covers the full list. Our post Ground Truth: SME-Approved vs Inferred Metadata covers the approval that makes the first answer citable.

What do the competing pages concede, and where do they stop?

We read six competing pages. The catalog vendors concede the distinction in their own words. A catalog vendor's own comparison page (published 2026-01-30, updated 2026-10-09) says: "A semantic layer tells you what your revenue is. An ontology tells you what a customer is." On where the semantic layer stops: "The ceiling, though, is conceptual depth." The same page then says "Building a full OWL-based ontology requires specialized skills that most data teams don't have" and that "A business glossary is a lightweight ontology." A second catalog vendor's page (2026-05-06) says "An ontology is the semantic layer, plus operational logic", then adds a third layer of its own above both.

Six pages, one pattern

PageSays a semantic layer answersSays an ontology answersWhere it stops
Catalog vendor, updated 2026-10-09"what your revenue is""what a customer is"A glossary stands in for the ontology; the catalog sits above both
Catalog vendor, 2026-05-06Metric definitions"the semantic layer, plus operational logic"Adds a third layer the vendor sells
TextQL, "Semantic Layers Are a Patch. Ontologies Are the Fix.", 2026-05-26A scoped set of questionsQuestions that "outpace what the data team has gotten around to modeling"Its ontology is a file format of its own
decube, updated 2026-09-09"how the business measures things""the business itself"Routes the reader to one, both, or neither
datus, updated 2026-10-30"what does this metric mean, and how is it computed?""what business entities exist, how are they related"Semantic layer first, ontology second
timbr, modified 2026-07-20Business-friendly definitions"the deeper meaning behind the data"Its own SQL-queried ontology is the answer

Three things recur. Each page ends in "both". Each puts the vendor's own product where the two meet. Each treats the standards as a cost: OWL is for specialists, and the work takes months. None asks who owns the definition once it exists, or what tests the data against it.

Is Palantir's ontology the same kind of ontology?

A common search beside this one is Palantir's ontology, where the word means an operational layer of object types, link types, and action types, in a vocabulary Palantir maintains. It works, inside that platform. Our post What Palantir Means by "Ontology" covers what it costs to move the meaning out. A semantic layer built on that ontology rests on one vendor's vocabulary, and the same test applies to a metrics file.

Do you need both, and which one comes first?

Yes to both. The order is the argument. Every competing page says semantic layer first, because the metrics file is quicker to ship. It is also where the confusion gets automated. A metrics layer can define a calculation. It cannot define a concept. Every metric is a calculation over concepts someone defined first. The choice is where that definition lives: on a record with an owner, or in the heads of whoever wrote the SQL.

Two build orders

Start withWhat you have after a quarterWhat the agent gets
The metrics fileRevenue, margin, and churn defined once; "customer" as a keyA formula and a guess
The concept modelCustomer, Policy, and Claim defined with owners; the same metrics attachedA definition it can cite, the joins it may take, and the formula

The better answer is one asset. The definition and the logic sit on the same governed record, with one owner and one version, so "what is a customer" and "how much did customers spend" cannot drift apart. Our post How to Build a Semantic Layer: Platform-Neutral Steps and What Each Native Layer Leaves Out gives the sequence.

Where does TopQuadrant fit?

TQ Data Foundation holds the ontology and the semantic layer on one governed record. What a customer is lives as a class on open standards, RDF, OWL, and SHACL, with a named owner, a version, and a review date. The metric that counts customers is defined on that class, so the definition and the calculation live on the same governed asset. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, and MCP. The join paths come from the ontology, so an invented join is unavailable. AI proposes the model and the mappings; your experts confirm them. Every definition is validated with SHACL, a standard TopQuadrant helped author, so the record exports whole. We maintain 300 reusable standards-based models, so "customer" starts from governed structure. Your catalog stays and syncs. Definitions resolve before generation, and our agent-ready semantic layer page shows it.

A metrics layer answers how much. An ontology answers what. TQ Data Foundation holds both answers on one record, with a name on it. Ask your semantic layer what a customer is. If the answer is a column, you have found the gap.

Give your AI the context it's been missing

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