Semantic layer
A governed model over analytical tables: which columns join, how each metric aggregates, which dimensions it can be sliced by.
- Entities as join keys
- Dimensions and metrics
- Compiles to SQL
- Serves BI tools, notebooks and agents
A semantic layer defines how business numbers are computed from tables. An ontology defines what the business’s things are and how they relate. AI agents increasingly need both.
This guide takes each apart — entities, dimensions and metrics on one side; classes, relations, rules and actions on the other — shows a real dbt semantic model, places both in the data stack, and explains which one an AI agent should consult for which kind of question.
Updated · 8 sources
A semantic layer sits between the data warehouse and the tools that use it, defining business metrics, dimensions and joins once so every dashboard, notebook and AI agent computes “revenue” the same way. An ontology models the domain itself — the classes of things, their properties, the relationships between them and the rules they obey. In semantic layer vs ontology, the semantic layer governs calculations over tables; the ontology governs meaning across entities.
Both promise “define it once, use it everywhere”. They define different things, for different questions.
A governed model over analytical tables: which columns join, how each metric aggregates, which dimensions it can be sliced by.
A model of the business’s things — customers, policies, claims — their relations and the rules or actions that apply to them.
dbt’s semantic models, Cube’s data model and AtScale’s universal semantic layer use different words for the same parts. AtScale’s definition is the shortest: a layer between your data warehouse and the tools that access it.
models:
- name: fact_claims
semantic_model:
enabled: true
agg_time_dimension: paid_date
columns:
- name: claim_id
entity: { type: primary, name: claim }
- name: policy_id
entity: { type: foreign, name: policy }
- name: paid_date
granularity: day
dimension: { type: time }
- name: line_of_business
dimension: { type: categorical }
metrics:
- name: claims_paid
type: simple
agg: sum
expr: paid_amountA formal ontology (OWL 2) gives classes and relations logical meaning. Operational ontologies, such as the one in Palantir Foundry, add the other half: the actions that change those objects, so decisions write back to the model.
the changed objects are what the next decision sees
Objects, properties and links — Palantir’s term for the part that describes the business’s entities and relations.
Actions and functions — the governed operations people and applications use to change those entities.
They are not rivals for the same slot. A mature stack often has both: the ontology names the entities, the semantic layer computes over the tables those entities live in.
The two meet at the entity. A semantic layer’s customer entity and an ontology’s Customer class should name the same thing, with the same identifier. When they do, an agent can find the right customers through the ontology and compute their numbers through the semantic layer. The Open Semantic Interchange, an open-source initiative Snowflake announced with partners in September 2025, is working on a vendor-neutral semantic model specification so those definitions can move between tools.
An agent that writes SQL against raw tables guesses at joins and definitions. dbt’s documentation describes connecting AI tools through its MCP server so answers use governed metrics instead of guessing at raw tables. The same logic applies to entities and an ontology.
What is the agent asked?
On Botminds the labels and fields of a collection serve as the semantic layer for data read from documents: the names reviewers see, the fields agents return, the columns of every view and the parameters of every API call are the same words.
Saved grids — columns, filters, sort and who may see them — plus summary and score views.
Reference tables agents look things up in: databases, spreadsheets, APIs, views and forms.
An intake agent receives the collection’s fields as its output schema.
Your systems read the same fields through the API; pages show them on cards.
Relations, too. Link fields join one register to another — vendors to payments — and parent and child collections keep invoices and their lines connected. Read AI data modeling and the Academy lesson on collections and schema.
No. In semantic layer vs ontology, a semantic layer defines how metrics are computed from analytical tables — joins, aggregations, dimensions — while an ontology defines the domain’s entities, relations and rules. They overlap at entities and work best when they share identifiers.
A layer between the data warehouse and the tools that use it, where metrics, dimensions and joins are defined once. Every dashboard, notebook and AI agent then queries the same definitions instead of re-deriving them.
A knowledge graph stores entities and their relationships as connected data, usually organised by an ontology. A semantic layer stores no data of its own; it translates metric requests into SQL over existing tables.
In dbt, a semantic model describes one table’s entities, dimensions and metrics for computation. An ontology describes classes of things and their relations across the whole domain, with formal meaning.
Without one, an agent writes SQL against raw tables and guesses joins and definitions. With one, it asks for a governed metric by name and gets the number every other tool would give.
If your questions are mostly metrics over a warehouse, a semantic layer is enough. If they cross many systems, depend on relations between entities or must trigger actions, an ontology earns its place too.
An open-source initiative Snowflake announced on 23 September 2025 with partners including Salesforce, dbt Labs and RelationalAI. Its aim is a vendor-neutral specification for semantic models, so metric definitions can move between tools.
Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.