Semantic layer and metrics governance
By the end of this module you will be able to:
- Explain metric drift using a two-dashboard example
- Define a semantic layer and say precisely what it centralises
- Describe the Open Semantic Interchange initiative and what its specification standardises
- State why AI agents with query access make shared semantics urgent
- Write a single metric definition carrying grain, filters, source and owner
One metric name, two dashboards, two different answers
Both chains share the same source and the same time window and differ on one filter, paid in period against any sign-in, so the board pack and the ops dashboard carry the identical metric name and report two different numbers.
Two dashboards can carry the same metric name and still disagree, because a name is not a definition. Agreeing the source, the filter and the time window once, in one place, is what makes the two numbers the same number.
Define the metric once and serve it everywhere
The warehouse holds tables with no shared meaning of its own, and the band above it holds each metric once with its grain, its filter and its owner, so the dashboard, the notebook and the agent are served one definition instead of three copies of the SQL.
A semantic layer holds the metric definition once, between the warehouse and every consumer of it. BI, notebooks and agents then read the same grain, the same filters and the same owner, so the board pack and the notebook cannot drift apart.
There is a meeting that happens in almost every organisation that has more than one reporting tool. Two people arrive with the same chart title and two different numbers. The first half of the meeting is spent arguing about whose figure is right. The second half is spent discovering that both are right, because the two charts were never counting the same thing. Nobody decided that. It happened by accretion, one sensible local change at a time, until the name on the chart stopped predicting the calculation behind it.
The disagreement is a governance problem with an engineering fix. The definition of a business measure has to live somewhere both tools read, the industry is trying to make those definitions portable between tools rather than retyped into each one, and most of these arguments end for good once the metric is written down properly.
The failure is easiest to see at its smallest scale, in two dashboards that agree on the label and disagree on everything underneath it.
35.1 One name, two answers
Take a measure that sounds unambiguous: active customers. The board pack reports it monthly. The operations team keeps its own live view of the same measure on a screen in the office. The two numbers do not match, and they have not matched for a year.
Trace each one back and the calculation splits into three decisions. Which source table are we counting from. Which filter says what counts as active. Which time window are we counting over. The board pack counts customers who paid in the period, drawn from the billing tables, over a rolling quarter. The operations view counts anyone who signed in, drawn from the product event stream, over the same rolling quarter. Two of the three decisions match exactly. One does not, and that single difference is enough to produce two defensible answers to what looks like one question.
This is . It is the state in which one named measure has quietly acquired more than one definition, spread across the tools that calculate it. It rarely arrives through a decision. It arrives when someone building a new dashboard needs a number quickly, writes the query that seems obviously correct, and ships it. Six months later that query has become the operational definition for a whole team, and neither team knows the other exists.
Two things make drift expensive out of proportion to its cause. The first is that it consumes decision time. Meetings that should be about what to do about the number turn into meetings about the number itself, and that reconciliation cost recurs every reporting cycle rather than being paid once. The second is that it damages trust in a way that generalises. Once a leadership team has been shown two contradictory figures for the same measure, they discount every figure, including the ones that were never in dispute.
Drift also presents itself badly. It looks like a reporting bug, so it gets routed to whoever maintains the dashboards, who fixes the specific chart in front of them. That is a repair, not a resolution. The next new dashboard starts the cycle again, because nothing has changed about where the definition lives.
Common misconception
“Two dashboards disagree because one of them has a bug.”
Most of the time neither query is wrong. Each is a faithful implementation of a different unwritten definition. Treating it as a bug sends the problem to an engineer who can only fix the instance in front of them. The durable fix is to decide the definition once, write it down with its grain, filters, source and owner, and then arrange for both tools to read that one definition rather than each carrying its own copy.
If the definition cannot live in each tool without diverging, it has to live somewhere the tools ask. That somewhere has a name and a shape.
35.2 What a semantic layer holds
A is a single place where business measures are defined once, sitting between the warehouse and everything that consumes numbers from it. A dashboard, a notebook or an agent does not write its own version of the calculation. It asks the layer for active customers, and the layer resolves that request into the one agreed piece of SQL.
It is worth being precise about what the layer centralises, because the term is used loosely. It typically holds four things. The entities and the join paths between them, so that no consumer has to remember how orders relate to customers. The dimensions that measures may legitimately be sliced by. The measures and the metrics built on top of them, each carrying its filters and its time handling. And the access rules, so that who may see which rows is decided in the same place as what the rows mean.
The arrangement where the layer has no interface of its own and serves every tool through an API is often called . The visualisation tools stay exactly where they are. What they give up is ownership of the definitions. That is what makes it possible to change reporting tool without reopening the argument about what revenue means.
Several implementations are in common use. The dbt Semantic Layer is powered by , which takes semantic models and metrics declared in YAML and generates the SQL for each request, working out the join path from the declarations rather than from hand-written joins. Cube is an open-source semantic layer that exposes its definitions through several standard interfaces so that any consumer can plug into them, including a Postgres-compatible SQL interface. LookML plays the same role inside Looker. They differ in packaging and in how much of the query engine they own, but they agree on the core move: the definition becomes a file that lives in version control, not a fragment of SQL living inside a chart.
None of this is a new idea in data management. It is the idea of registering the meaning of a data element once, in a managed register, so that everyone referencing that element references the same definition. That principle is standardised, and it predates every tool named above.
“This document provides the means for understanding and associating the individual parts of ISO/IEC 11179 and is the foundation for a conceptual understanding of metadata and metadata registries.”
ISO/IEC 11179-1:2023, Information technology, Metadata registries (MDR) - Part 1: Framework, Scope
A metadata registry records descriptions of data: what a field means, how it is represented and who administers it. The semantic layer is the same principle carried one level up, from the field to the business measure, with an execution engine attached. Registering meaning once is decades old; what modern tooling adds is that the registered definition is also the thing that runs, so it cannot drift away from the query that produces the number.
The layer also depends on modelling work done earlier in this course. A metric is meaningless without a stated , because the grain fixes what one row represents and therefore what is being counted. Dimensional models that share conformed dimensions are what let two metrics be sliced by the same region or the same period and still compare. A semantic layer laid over an incoherent warehouse does not fix the warehouse. It makes the incoherence visible in one place, which is an improvement, but it is not the same thing as a fix.
Common misconception
“We already have a business glossary, so we do not need a semantic layer.”
A business glossary and a semantic layer solve adjacent problems and neither substitutes for the other. A glossary is about language: it records what the organisation means by active customer in prose that a human reads. A semantic layer is about execution: it holds the definition in a form a query engine runs. A glossary entry can be perfectly written and still be ignored by every dashboard in the estate, because nothing connects the sentence to the SQL. The two work together when the glossary term and the metric definition reference each other.
A definition that only one vendor can read solves drift inside that vendor and creates a new dependency outside it. That is the gap the interchange work aims at.
35.3 Making definitions portable
Centralising a metric inside one vendor's semantic layer removes the drift and introduces a different exposure. The definitions are now the most valuable governed asset the analytics estate has, and they are expressed in a format that one supplier controls. Migrating tools means rewriting them.
The is the industry response. It launched in September 2025 with Snowflake, dbt Labs and Salesforce among the initiating firms, and it has since grown into a working group with a large membership across the analytics, BI and AI vendors. It describes itself as an industry-wide specification effort to standardise how semantic metadata is exchanged across analytics, AI and BI platforms, giving a vendor-neutral single source of truth for semantic data. The specification is published under an Apache 2.0 open-source licence.
Be precise about what it standardises, because this is where descriptions of it tend to overreach. It standardises the exchange format for semantic metadata: metrics, dimensions and the joins between entities, expressed declaratively in YAML. It does not standardise how any engine computes a result, it does not prescribe a warehouse, and it does not tell an organisation what its metrics should be. The claim is portability of meaning, summarised by the initiative as writing a definition once and querying it anywhere.
Treat it as an initiative rather than as a settled fact of the landscape. A specification with vendor backing is a promise about interoperability; the thing that makes it real is whether the tools an organisation actually runs read and write it faithfully. Until that is demonstrable, the practical stance is to ask each supplier what its support amounts to and to keep metric definitions in version control in a declarative form, which is worth doing on its own terms and leaves the door open if the standard holds.
Portability matters more once the consumer asking for a number is not a person who would notice that it looked wrong.
35.4 Why agents raise the stakes
Until recently every consumer of a metric was a person. A person who has worked in the business for two years looks at a customer count that is ten per cent higher than last week and stops. That instinct is an unpaid quality control that the whole reporting estate has been quietly relying on.
Agent access removes it. Once an assistant can reach a warehouse through a standard connector such as the , it can enumerate tables, read column names and write SQL. What it cannot do is know which of the four plausible definitions of active customer the organisation treats as authoritative, because that decision is not recorded anywhere the agent can read. It will pick one, write correct SQL against it, and return an answer with no hedging at all.
That failure mode is worse than a human error in three ways. It is confident, so nothing in the output signals that a judgement was made. It is unrepeatable, so the same question asked twice can resolve to different definitions. And it scales, because an agent asked forty questions makes forty of these silent choices in the time a person makes one.
A semantic layer is the correction, because it turns the missing judgement into a lookup. The agent does not choose a definition; it requests a named metric and the layer resolves it. The same layer is also the sensible place to enforce which rows the agent may see, since access rules and meaning then change together rather than in two systems that drift apart. This is why an argument about dashboards that was tolerable for a decade became urgent within about a year of agents getting query access.
Common misconception
“A capable model can work out what revenue means from the column names.”
It can produce a defensible guess, which is exactly the problem. Column names encode what a field was called by whoever created the table, not which of several competing business definitions the organisation has agreed to report. Whether refunds are netted off, whether internal test accounts are excluded, whether the figure is recognised on invoice date or on payment date: none of that is visible in a schema. A confident answer to a question the model was not equipped to settle is harder to catch than an obvious error, because there is nothing in the output that looks wrong.
All of the machinery above is only worth building if somebody has done the small, unglamorous piece of writing it exists to serve.
35.5 Writing one metric properly
A usable is short. It is not a document and it is not a modelling exercise. It is five fields that someone has actually decided:
- Name. The exact label that will appear on every chart. If two teams need genuinely different measures, they get two names, not one name and a footnote.
- Grain. What one counted thing is. One customer, one order line, one meter reading in one half hour. Stated before any column is chosen.
- Filters. Every condition applied, including the ones that feel too obvious to write down, such as excluding internal test accounts or cancelled orders. Unwritten filters are where drift starts.
- Source. The specific table or model the measure is built from, so that a reader can go and look.
- Owner. A named person who decides when the definition changes. Not a team, not a committee.
Two fields are worth adding as soon as the first argument recurs. A time window, stating whether the measure is a point-in-time count, a rolling period or a calendar period, since a surprising share of disagreements are only about this. And the set of dimensions the metric may legitimately be sliced by, which stops a measure defined at one grain being broken down by something that produces double counting.
Written out, the earlier example becomes a definition rather than an assumption. Active customers: a count of distinct customers, where the customer has at least one successful payment in the period, excluding internal and test accounts, built from the billing model, measured over a rolling ninety days, sliceable by region and plan, owned by the finance data lead. Anyone can now disagree with that. What they can no longer do is disagree with it accidentally.
Ownership only means something if a change to the definition is a change to a file. When the definition lives in version control, altering it produces a reviewable difference, a date and an author, and the dashboards that move as a result move because someone approved it. That is also the point at which a metric can carry tests, the same way a carries expectations about the dataset underneath it, so that a change which would silently break a downstream figure fails in the build instead of in the board pack.
Finally, connect the definition to the language around it. The entry in the explains the term to someone who does not write SQL; the metric definition is what runs. Where the two reference each other, a reader who starts from either end reaches the same answer, and the organisation stops maintaining two competing accounts of what its own words mean.
One good definition is a start. Keeping several hundred of them honest over years is a different discipline, and it is mostly about who decides and how change is handled.
35.6 Running metrics governance
Metrics governance fails in two opposite directions, and it is worth naming both because organisations tend to overcorrect from one into the other. The first is the free-for-all already described, where anyone can define anything and nothing is authoritative. The second is a central committee that must approve every new measure, which produces a queue, and a queue produces exactly the same shadow definitions the committee was created to prevent, only now they are hidden.
The arrangement that survives contact with a real organisation sits between the two. A small set of measures is treated as certified: the ones that appear in board reporting, in regulatory returns, in incentives and in anything published outside the organisation. Those have named owners, review dates and tests, and changing one is a deliberate act. Everything else is left open, clearly marked as uncertified, and allowed to evolve wherever the analysis needs it. Analysts get their speed, the numbers that carry consequences get their control, and the boundary between the two is visible in the tooling rather than in a policy nobody reads.
Two operational habits do most of the work. The first is treating a definition change as a release. When the finance lead decides that refunds should be netted off revenue, that decision has a date, an author and a note explaining why, and it is possible afterwards to say which figures were produced under which definition. Restating history without a record is how organisations lose the ability to explain their own trends. The second is retiring measures. A metric catalogue that only ever grows becomes unusable at a few hundred entries, and a measure nobody has queried in a year is a liability rather than an asset, because someone will eventually find it and treat it as authoritative.
Adoption is the part that is usually underestimated. A semantic layer that half the estate bypasses has not removed drift; it has added a fourth definition alongside the three that already existed. The honest measure of success is not how many metrics have been defined but what share of the numbers that reach a decision-maker were resolved through the layer. That figure is knowable, because the layer logs every request, and it is the one worth reporting to whoever sponsored the work.
A finance dashboard and an operations dashboard both report active customers and give different figures. Both queries have been reviewed and neither contains an error. What is the most useful first diagnostic step?
Your organisation is adopting a semantic layer. Which statement most accurately describes what moves into it?
An internal assistant has been given query access to the warehouse and is asked how many active customers there were last quarter. No semantic layer exists. What is the most likely outcome?
Everything above treats the cost of a loose definition as a wasted meeting, and that holds until the rows being counted are people. Once they are, the fields a definition must carry stop being an internal choice: Governance, regulation and compliance covers the lawful basis that has to be settled before collection starts, the transfer rules left in place by Schrems II, and the documentation a regulator asks for when accountability is tested.
Core distinctions
- Metric drift is one measure name carrying several definitions across different tools. It arrives by accretion rather than by decision, and it presents as a reporting bug while actually being a governance failure.
- A semantic layer centralises metric definitions, join paths, permitted dimensions and access rules between the warehouse and every consumer, so dashboards, notebooks and agents resolve the same request to the same calculation.
- Registering meaning once is a long-standing principle in data management, formalised for data elements by the ISO/IEC 11179 metadata registry series. The semantic layer applies it to business measures and attaches an execution engine.
- The Open Semantic Interchange, launched in September 2025 and published under an Apache 2.0 licence, standardises how semantic metadata such as metrics, dimensions and joins is exchanged between analytics, BI and AI platforms. It is an interoperability promise, not a computation standard.
- Agents with query access read schemas but not agreed definitions, so they select one and answer confidently. Shared semantics became urgent because the human instinct that used to catch a wrong-looking number is no longer in the loop.
- A workable metric definition is five decided fields: name, grain, filters, source and owner, held in version control so that changing it is a reviewable change rather than an accident.
Standards and sources cited in this module
ISO/IEC 11179-1:2023, Metadata registries, Part 1: Framework
Scope
The standard that frames registering and administering the definitions of data elements. It is the conceptual ancestor of the semantic layer and sets out why meaning is registered once rather than restated per project.
Specification overview and working group
Primary site for the vendor-neutral interchange effort: what the specification standardises, the declarative YAML form of metric, dimension and join definitions, and the Apache 2.0 licensing.
About MetricFlow, dbt documentation
Semantic models, measures and metrics
Vendor documentation for the query generation engine underneath the dbt Semantic Layer, showing how semantic models declared in YAML are turned into generated SQL rather than hand-written joins.
Cube documentation, introduction
Semantic layer and APIs
Worked description of a headless semantic layer that centralises definitions, joins, access rules and caching upstream of every BI tool, application and agent that queries the data.
Model Context Protocol Specification
Overview
The open standard that gives assistants a common way to reach data sources and tools. Useful for understanding why agent query access made shared metric definitions an immediate governance concern.
Module 35 of 52 · Data and AI