What is a semantic layer?
Think of it as the rulebook for your data. It records what each metric means, how it's calculated, and how sources fit together, so a dashboard, an analyst, and an AI tool all apply the same rules instead of each reinventing them.
Without one, every team builds its own math. One analyst calculates ROAS with returns removed, another doesn't. One market calls a campaign "Summer Sale," another calls it "SS_2026_Promo." The data is the same, but the answers are different, and the first part of every meeting goes to deciding whose number is right.
A semantic layer fixes that at the definition level. The logic lives in one place, and everything else reads from it.
How does a semantic layer work?
A semantic layer sits between where data is stored and where it's used. It doesn't replace the data warehouse or copy the data somewhere new. It describes the data: which tables connect, what each field means, and how each metric is calculated. When a dashboard, an analyst, or an AI agent asks for a number, the semantic layer supplies the definition, so the answer comes out the same no matter who asked.
What a semantic layer defines
| Part | What it covers | Example |
|---|---|---|
| Metric definitions | How each KPI is calculated | ROAS, CPA, conversion rate, cost per lead |
| Business entities | The things performance belongs to | Account, campaign, ad group, ad, keyword |
| Relationships | How data from different sources fits together | Ad stats linked to the campaign and account they belong to |
| Calendars | How the business counts time | Fiscal calendar, promotional calendar |
| Mappings and taxonomy | How platform labels map to business categories | Media channel, funnel stage, campaign type, region |
From raw data to shared answers
- Connect the sources. Performance and business data comes in from every platform.
- Model the relationships. Tables are linked to shared entities and calendars, so data from different platforms fits together.
- Define each metric once. KPI logic is set one time, for every team, region, and currency.
- Serve every tool. Dashboards, ad hoc analysis, and AI tools all read the same definitions.
What is an example of a semantic layer?
Two situations show what a semantic layer changes in practice.
One metric, one definition
Marketing reports ROAS of 4.1. Finance reports 3.6. Both are "right": marketing uses platform-reported revenue, while finance removes returns.
With a semantic layer, the business defines ROAS once (for example, net of returns, in one currency), and every dashboard, deck, and AI answer uses that definition. The two numbers become one.
One campaign, five names
A global brand runs a summer promotion in five markets, and each market names it differently: "Summer Sale," "SS_2026," "Ete_Promo," and so on.
A semantic layer maps every variation to one business category, so the global team sees one campaign with one total, not five fragments to reconcile by hand.
Semantic layer vs. data warehouse vs. BI tool
Adding a semantic layer doesn't mean giving up the warehouse or the BI tool. Each does a different job.
| Data warehouse | Definitions inside a BI tool | Semantic layer | |
|---|---|---|---|
| Main job | Stores the data | Visualizes the data | Defines what the data means |
| Where business logic lives | In queries people write | In each dashboard or report | In one shared place |
| When a definition changes | Update every query | Rebuild each view | Update it once |
| Consistency across tools | Depends on who wrote the query | Limited to that tool | Every connected tool uses the same logic |
| Use by AI and agents | Needs someone to explain the tables | Locked inside the tool | Gives AI the same definitions people use |
Why does a semantic layer matter for marketing and AI?
Marketing data comes from an unusually large number of sources and formats. Every ad platform defines metrics its own way, and every market names things differently. Without shared definitions, cross-channel and cross-market reporting turns into reconciliation, and leaders lose confidence in the numbers.
- Faster decisions. When everyone trusts the numbers, meetings move straight to what to do next.
- Fewer reporting discrepancies. Shared logic means reports from different teams agree.
- Fair comparisons. Channels, regions, and brands are measured against the same standard.
- Better AI answers. When an AI assistant and a dashboard read the same definitions, nobody has to decide which one to believe.
How does Alli do this?
Alli by PMG's Semantic Layer is a semantic layer built for marketing. It defines KPIs once, models how performance data connects to campaigns, ads, accounts, and calendars, and includes Categorizations, which maps platform naming into one plain-English taxonomy without manual tagging.
Every dashboard, Data Explorer view, Ask Alli answer, alert, and planning tool in Alli reads from those same definitions, so the numbers agree across teams, regions, and currencies.
Explore Alli Semantic LayerSemantic layer FAQ
Is a semantic layer the same as a metrics layer?
Mostly. A metrics layer usually refers to the part of a semantic layer that defines KPIs and how they're calculated. A semantic layer typically covers more: business entities, the relationships between data sources, calendars, and how platform labels map to business categories.
What's the difference between a semantic layer and a data warehouse?
A data warehouse stores data. A semantic layer defines what that data means and how to calculate metrics from it. Most teams use both: the warehouse holds the data, and the semantic layer makes sure every tool reads it the same way.
Do I need a semantic layer if we already have naming conventions?
Naming conventions help, but they depend on everyone following them, and they break when markets move fast or platforms change fields. A semantic layer applies the rules in one place, so data is mapped consistently even when the names going in are not.
How does a semantic layer help AI tools?
AI tools answer from the definitions they're given. If those definitions differ from tool to tool, AI answers will too. A semantic layer gives AI the same governed definitions people use, so an answer from an AI assistant matches the dashboard.
Who usually owns a semantic layer?
Data and analytics teams usually maintain it, with input from marketing and finance on how each KPI should be defined. The point is that a definition is agreed once and changed on purpose, not rebuilt in every spreadsheet.
Last updated ‹ Back to the glossary
