Data governance
7 min

Semantic Layer vs Knowledge Graph: Where Meaning Lives and Where It Is Stored

Key takeaways

  • A semantic layer is the job of serving agreed meaning, concepts and metrics alike, to every consumer. A knowledge graph is the structure that stores that meaning and the entities it describes as nodes and typed relationships.
  • The two are complementary. The layer that holds up for AI agents is built on a knowledge graph, because a definition with an owner, a version, and relationships to other definitions is already a node.
  • Metrics-layer products say where their meaning lives in their own docs: dbt keeps semantic models as YAML in the project, and Snowflake stores a semantic view as a schema-level object it classes as metadata.
  • Owning a graph does not give you a semantic layer. Metrics on the concept, approved mappings to the warehouse, a SQL-shaped serving interface, and entitlements per request still have to be added.
  • The three-way vendor comparisons agree the layers stack. Every one of them puts the concept and the calculation that measures it on two assets with no named owner on either, which is the gap this article closes.
In this article
Share

An architect at an insurer gets the same request from two teams in one week. The analytics team wants a semantic layer, so every dashboard computes loss ratio the same way. The AI team wants a knowledge graph, so the claims agent can tell a policyholder from a claimant. Each team says the other's thing is already covered. The semantic layer vs knowledge graph question is whether they are asking for one asset or two.

They are asking for two jobs that share one record. A semantic layer is where a business keeps what its data means and serves that meaning to every tool that queries it. A knowledge graph is a structure: entities, typed relationships, and identifiers, in a form a machine can traverse. Meaning lives in the layer's definitions. The graph is where those definitions, and the things they describe, are stored and connected.

Meaning lives in the semantic layer's definitions. Those definitions, and the entities they describe, are stored and connected in a knowledge graph. One governed record can do both jobs when it is held on open standards with a named owner.

What is the difference between a semantic layer and a knowledge graph?

One word is about meaning and who agreed it. The other is about structure and how it is held. Our post What Is a Semantic Layer? defines the layer and the eight things it holds. This article takes the one row of that definition the market gets wrong: where the meaning is kept.

Job and structure, side by side

DimensionSemantic layerKnowledge graph
What it isA job: serving agreed meaning to every consumerA structure: entities and typed relationships a machine can traverse
Unit of recordA definition, of a concept or a metricAn entity, or a relationship between two
Question it settlesWhat does net revenue mean, and how much is it?Which customer holds which policy under which contract?
Where the meaning is writtenWhatever the product speaks: often a YAML file or a database objectIn the data, on RDF, OWL, and SKOS, validated with SHACL, the W3C Shapes Constraint Language
How it failsThree numbers for one metricA populated graph nobody approved

A definition is a thing with an owner, a version, and relationships to other definitions. That is a node. A semantic layer built on an ontology, which is a formal model of what the business's concepts are, is already a graph. Our post Semantic Layer vs Ontology: Which One Says What a Customer Is takes the ontology half.

Where does the meaning live in each one?

The metrics layers most people meet first keep their definitions as configuration. dbt's documentation on semantic models, last updated 2026-09-08, says to "Configure semantic models in a YAML file within your dbt project directory". The same page says to "Think of semantic models as nodes connected by entities in a semantic graph", where an entity is any column "that serves as a join key" (dbt documentation). Snowflake's overview of semantic views, read on 2026-11-22, says "You can store semantic business concepts directly in the database in a Semantic View, which is a schema-level object". The same page says "Semantic views are considered metadata" (Snowflake documentation).

Where each product keeps its definitions

  • A dbt project. The definition is YAML in a code repository. The entity is a join key. The graph dbt describes is a join graph between tables.
  • A Snowflake semantic view. The definition is a schema-level object in the database.
  • A knowledge graph on open standards. The definition is data in the same graph as the entities it describes. The owner, the version, and the validation rule are properties on the node, and a query returns them.

Both descriptions are accurate, and both put the meaning where a machine executes it and a person has to go looking for it. In a YAML file, the definition of a customer is a comment beside a join key. In a knowledge graph it is a node with an owner on it. A metrics layer can define a calculation. It cannot define a concept. Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes that sentence apart.

Does a semantic layer need a knowledge graph?

It needs one when the definitions relate to each other and a machine has to follow the relationships. For a layer that only serves metrics to dashboards, a model file is enough. The agent case is different, for three reasons.

Three places the layer is already a graph

  • The concept. "What is a customer" resolves to relationships: a customer holds an account, an account carries transactions, a transaction has a currency. That is a graph whether or not it is stored as one.
  • The mapping. Concept to table to column is a path. Held as data, it can be queried and audited. Held in a file, it can only be read.
  • The lineage. Source, model, metric, and report are one connected chain. A value is defensible when a consumer can walk that chain back from the number.

At what size does a governed table with an API stop doing the job? Our post on how a knowledge graph relates to the job of serving agreed meaning to an AI system answers that. We call the job context management, and the meaning it serves authoritative context.

Can a knowledge graph be a semantic layer on its own?

No. A populated graph can be accurate and still answer no dashboard. Four things have to be added, and each is a governed asset of its own.

What the layer adds to the graph

AddedWhat the graph hasWhat the layer adds
MetricsThe concept an order isNet revenue as a calculation on that concept, with its grain and dimensions
MappingsAn identifier for each entityThe approved path from each concept and metric to the physical columns
ServingA graph query endpointThe same record answered in SQL, over an API, and over MCP, because BI tools speak SQL
EntitlementsWhatever the store enforces on nodesRules on the concept, evaluated for each request against the asker's role

The storage under the graph is a separate question and it stays separate here. Our post Knowledge Graph vs. Graph Database settles what a database holds, what identity across systems needs, and what inference and validation add above storage.

What do the three-way comparison pages agree on?

Three vendor pages on this query land on the same split and say so.

What the vendor pages say

  • timbr, 2026-06-17, modified 2026-07-20: "A semantic layer makes governed business definitions queryable. An ontology defines the concepts, relationships, rules, and inferences behind those definitions. A knowledge graph connects those concepts as entities with relationships, traversable across domains" (timbr).
  • Galaxy, 2026-01-30, updated October 2026: "A semantic layer defines metrics, dimensions, and joins once, then answers queries against them." A knowledge graph "stores entities, such as customers, contracts, and products, along with typed relationships between them and an ontology that defines what each type means" (Galaxy).
  • DQLabs, 2026-06-05, modified 2026-06-08: "The semantic layer feeds the knowledge graph with definitional grounding and feeds the context graph with semantic context" (DQLabs).

So the category agrees that the two stack. What all three do next is the problem. Each hands "what is a customer" to the graph or the ontology and leaves the metric in the layer. That puts the concept and the calculation on two assets, in two products, with no named owner on either. Galaxy names SHACL in one sentence. The other two pages do not name it. None of the three says what happens when the metric moves and the concept does not. That is the meeting from paragraph one, held every quarter.

What does an agent traverse when the layer is a graph?

Here is the difference as a walk. An agent is asked for net revenue from active customers last quarter. Our post What Is a Semantic Layer? shows the governed record for net revenue as a table. In a knowledge graph it is a set of nodes, and the agent reaches each by following an edge.

One question, five hops

HopNode reachedWhat it carriesWhat the agent does with it
1. Net revenueA metricDefinition, calculation, an owner in Finance, version 3, review due 2027-03-14Quotes the definition and uses the approved formula
2. measuresOrder, a conceptA SHACL shape: exactly one currency, a non-negative gross amountKnows which records count as orders
3. placed byCustomer, a conceptThe scope rule for "active", set by FinanceApplies the agreed filter instead of inventing one
4. mapped toTwo columns in the warehouseMappings proposed by automation and approved by the ownerComposes the query over approved columns only
5. visible toAn entitlementFinance and Sales roles; refund detail to Finance onlyReturns what its caller may see, and no more

Every hop is an edge in the same graph the definitions live in. The join from order to customer exists because the model declares it, so an invented join is unavailable. The answer carries the definition version it resolved, so it can be replayed. Automation can propose most of these nodes. A person with accountability approves them, and our post Ground Truth: SME-Approved vs Inferred Metadata covers what that approval adds. Our post A Semantic Layer for AI Agents: What the Agent Needs Before It Asks for Revenue puts the five things the agent needs in order.

Where does TopQuadrant fit?

TopQuadrant does not sell the warehouse, the dashboard, or the YAML file. TQ Data Foundation is a semantic layer held as a knowledge graph on open standards. Every metric carries its business definition, its owner, its calculation, and its mapping to physical columns. The meaning and the logic live on the same governed asset. Mappings from governed concepts to physical schemas are explicit assets you can query. Source, model, metric, and report are one connected graph, so a value carries where it came from. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, and MCP. Only modelled relationships are traversable. Entitlements attach to the governed concept and are evaluated per request. AI proposes the mappings and definitions; your experts confirm them. Every definition is validated with SHACL, the W3C standard whose Recommendation lists a TopQuadrant editor. The standards are open, so the record exports in full. Your catalog stays, and it syncs.

So the two teams in the first paragraph are funding one asset. The semantic layer is what it means. The knowledge graph is where that meaning is kept. TopQuadrant holds both on one record, and a person signed 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.