The Semantic Layer: Where Metric Definitions Should Actually Live
Aug 2026 · Data GovernanceEvery other post in this cluster stops at the same place. Classification labels the field, lineage traces where it went, contracts govern how it changes, access control decides who can read it — and then the data reaches a BI tool, someone writes a calculation inside it, and a number appears on a slide that nobody upstream can account for. The governed estate ends at the warehouse boundary. The number that gets argued about in the meeting is produced on the other side of it. This is the post about that last layer.
Two Dashboards, Two Numbers, Both Defensible
The recurring version of this problem is not a data quality incident. Nothing is broken. The pipeline is fresh, the tests pass, the tables are correct — and two teams present different revenue for the same month, both able to defend their figure line by line.
The divergence is almost never dramatic. It is usually one of a short list:
| Where definitions split | What the disagreement looks like |
|---|---|
| Filter scope | One definition excludes cancellations, refunds, internal orders, or test accounts; the other does not, or excludes a different subset. |
| Time attribution | Order date versus ship date versus recognition date. Every one is a legitimate business view; they never agree at a month boundary. |
| Grain and joins | A join to a dimension with more than one matching row silently multiplies the measure. The total is inflated and nothing errors. |
| Conversions | Currency applied at transaction rate in one place and month-end rate in another; timezone boundaries shifting rows between periods. |
| Aggregation rules | A ratio averaged across groups rather than recomputed from its components — correct at the row level, wrong at every rollup. |
What makes this expensive is not the discrepancy but the reconciliation, and the fact that the reconciliation recurs. Someone spends a day tracing both queries, finds the divergence, writes an email, and the next quarter it happens again with a different pair of reports — because the fix was an explanation, not a change to where the definition lives.
The Definition Is the Governed Asset
The reframe that makes this tractable: a metric definition is an asset with the same governance needs as a table. It has an owner, a meaning, a version history, dependencies, and consumers who break when it changes. Yet in most estates it lives somewhere with none of that — a saved calculation inside a BI tool, a CASE statement in a query someone shared, a formula in a spreadsheet that got authoritative through repetition.
A semantic layer is simply the decision to store that definition somewhere governable and have consumers request the named metric rather than reimplement it. The technology choices vary and matter less than the location. Once net_revenue is defined once, in code, in version control, with an owner and a test, three properties follow that no amount of dashboard discipline produces:
Change becomes reviewable. Amending the definition is a pull request with a diff, not an edit inside a tool that leaves no trace and notifies nobody. That is the same producer-boundary discipline argued in the data contracts post, applied one layer up: a contract governs what a column means, a semantic layer governs what a metric means, and both exist so the change is visible before it propagates.
The definition becomes discoverable. "What do we mean by active customer" gets an answer with an owner attached instead of an opinion. This is where the semantic layer and the data dictionary stop being separate projects: the dictionary describes the concept in words, the semantic layer computes it, and when they are wired together the description stops drifting from the implementation because they ship in the same change.
Consumers stop being the last mile. Notebooks, embedded analytics, reverse ETL, and increasingly natural-language interfaces can all request the same governed metric. That last one is not speculative any more — the failure mode of an AI agent answering business questions directly against warehouse tables is precisely that it invents a plausible definition. It writes a defensible query, returns a confident number, and there is no way to tell from the answer which of the five revenue definitions it happened to reconstruct. A governed metric layer is one of the few controls that actually constrains that, which is the practical complement to the identity-side controls in governing AI agents' data access: restricting what an agent can read does nothing about what it computes.
It Fixes Lineage's Darkest Edge
There is a specific structural argument for this layer, and it is the one I find most convincing. When I wrote about lineage, the honest caveat was that every graph has dark edges — paths the graph cannot see. The single largest one in most estates is exactly this: metrics recalculated inside the BI tool rather than in the warehouse. Lineage traces columns up to the point where a consumer tool takes over, and then goes blind precisely where the business logic gets applied.
That blindness is not cosmetic. It means impact analysis systematically understates blast radius: a column change shows two downstream models and no indication that fourteen dashboard-local calculations reference it, because those live in a tool the graph does not parse. It also means quality SLAs can be fully green on every underlying table while the number a consumer reads is wrong, because the defect was introduced after the last governed hop.
Moving definitions into a semantic layer converts those dark edges into ordinary ones. The metric becomes a node in the graph with real upstream dependencies, so a schema change can compute which metrics it affects, and a quality alert can name the metrics now serving suspect data. That is a governance gain independent of whether anybody was arguing about revenue in the first place.
Ownership Is the Hard Part, Not the Modeling
The engineering work of standing one up is bounded. The part that stalls is answering: who decides what revenue means?
Centralizing definitions forces a decision that ambiguity had been comfortably deferring. Finance, sales operations, and the analytics team have each been computing their own version, often correctly for their own purpose, and the semantic layer requires someone to either pick one or explicitly name several. Teams that treat this as a modeling exercise discover in month three that they built a system whose central entries nobody will sign off on — the same shape of failure as a stewardship rollout that scoped itself on an org chart rather than on where decisions actually get made.
The workable posture is to allow plurality but require it to be named. If finance and operations genuinely need different revenue treatments, define net_revenue_finance and net_revenue_ops with documented differences and separate owners. That is honest and it ends the argument, because the disagreement moves from "your number is wrong" to "you used the other metric." Forcing a single truth where two legitimately exist produces a governed definition that half the organization quietly works around, which is worse than the state you started in — now the shadow definitions have a false authority to hide behind.
When a Semantic Layer Makes Things Worse
Three ways this goes badly, all of which I would check for before recommending the work.
It becomes a second place logic lives, not the only place. Most BI tools happily let local calculations coexist with governed metrics. Without an explicit policy and a migration that actually removes the duplicates, you get both — and now a discrepancy is harder to diagnose, because a chart's number might come from either source and the surface does not say which. Adoption has to be enforced as deprecation, not offered as an option.
It adds latency to the question loop. If defining a new metric requires a pull request, a review, and a deployment, analysts under time pressure will route around it — and they should, because the alternative is not answering the question. A layer that governs the durable, cross-team metrics while leaving genuine exploration unrestricted survives; one that tries to govern every calculation gets bypassed and ends up governing nothing while still costing the process.
It solves a problem you do not have. If reporting is a stable set of dashboards maintained by the same people who build the pipelines, definitions are not diverging, because there is only one author. Adding a semantic layer there buys a build step and a deployment surface to fix an absent problem. The honest trigger is a recurring reconciliation cost between teams — if you cannot point at one that happened twice, this is architecture for its own sake.
Start With the Metric Two Teams Already Argue About
The sequencing is the same one that works for the rest of this cluster: start where the pain already happened, not with a comprehensive model. Take the one metric that has caused a reconciliation more than once, define it in the layer, migrate every surface that reports it, and delete the local copies. One metric, fully migrated, with the duplicates actually removed, is worth more than forty definitions modeled alongside forty surviving shadow versions.
That first migration also surfaces the ownership question at a scale where it can be answered, which is the real gate. Once one contested metric has a name, an owner, and no competing implementations, expansion is a queue rather than a program — and the queue orders itself, because the next candidate is whatever caused the last argument.
What would make this wrong:
- If your reporting is authored end-to-end by one team, definitions are not diverging and this layer is pure overhead — the argument here depends entirely on multiple independent authors, not on estate size.
- If leadership will not adjudicate a contested definition, the layer cannot be populated where it matters most and will fill up with uncontroversial metrics that nobody was fighting about — fix the decision rights first, or expect a governed catalog of the easy cases.
- If BI platforms mature to the point where their internal metric stores are genuinely portable and externally queryable, the case for a separate layer weakens considerably — the requirement is that the definition be governable and shared, not that it live in a dedicated tool.
- If analysts route around it because the change loop is too slow, you have added a governance surface and kept every shadow definition — strictly worse than before, and the tell shows up as adoption metrics that plateau while dashboards keep getting built.
- If the actual complaint is that numbers arrive late or wrong rather than defined inconsistently, this is the wrong layer entirely — that is a quality SLA problem, and a semantic layer will make it neither better nor worse.
Data & AI governance, from the field
Notes on governance that actually ships — and the free RFP & TCO scorecard as a welcome gift.
No spam, unsubscribe anytime.
You're in — check your inbox for a welcome note.