Skip to main content

2026 Embedded Analytics Solution of the Year (Data Breakthrough Awards) & G2 High Performer

Back to blog list

What Is a Semantic Layer, and Where Should Yours Live?

A semantic layer defines business metrics like revenue and churn once and serves the same answer to every tool or person that queries it. Where it should live depends on who queries it, and serving your own customers adds per-customer scoping on every request.

Summarize with:

What Is a Semantic Layer?

A semantic layer is a governed translation layer between stored data and every tool or person that queries it. It defines business terms such as revenue, active customer and churn once, as dimensions and measures with their joins and access rules, so every consumer gets the same answer.

The definitions themselves form the semantic model; the layer is that model plus the service that answers queries against it, often with caching and query interfaces such as SQL or an application programming interface (API). A semantic layer can live inside a business intelligence (BI) tool, in the data platform, next to the transformation code, or as a standalone layer, and who queries it is a key guide to where it belongs.

That split between model and layer matters more than it looks. The semantic model is the written-down meaning: what counts as active, which table joins to which, which measure sums and which counts distinct. The layer is what puts that meaning to work. It takes a request from a dashboard, a Jupyter notebook or an application, resolves it against the model, applies the access rules and returns an answer. Without the serving part, you've got careful documentation and no guarantee anyone reads it.

So when the finance spreadsheet, the analyst's notebook and the product's admin panel all ask how many customers were active last month, they get one number. They're reading one definition.

Each metric is defined once and served to many consumers. The model holds the definitions; everything that delivers them is what makes it a layer.

Is a Semantic Layer Real, or Just a New Name for an Old Idea?

Three teams walk into a quarterly review with the same metric. Product's number comes from its analytics tool, which counts anyone who logged in during the period as an active customer. Finance's number comes from a business intelligence (BI) workbook that counts accounts with a paid subscription. Sales has a third figure from the customer relationship management (CRM) report, which counts accounts with an open contract.

Nobody's wrong. That's what makes it so expensive.

Each definition is reasonable for the team that wrote it, and the meeting still goes to arguing about whose number counts instead of what to do about it. This is the problem a semantic layer solves. You define "active customer" once, with its joins and filters, and every tool that asks gets the same answer. When the business changes its mind about what "active" means, the definition changes in one place, not in three tools maintained by three different people.

We understand the eye-rolls. If you've been in data long enough, you've heard this pitch before. Online analytical processing (OLAP) cubes pre-defined measures and dimensions so analysts could slice them consistently. SAP BusinessObjects universes mapped database tables to business terms so report writers never had to touch raw SQL. Both were attempts at a single source of truth, and both did the job well inside the tool they belonged to.

So the sceptics are right about the branding. They're wrong if they conclude there's nothing here.

What's changed is the number of consumers. A cube mostly served its own front end. Today the same definition of an active customer might be read by a dashboard, a notebook, an application and an AI agent, and none of them should have to work it out again. The definitions moved out of a single tool because they now have to serve several, and that's exactly why it matters where you put them.

What's Inside a Semantic Layer?

Whatever the vendor calls them, most semantic layers are built from the same six parts.

  • Entities and joins: the business objects (customers, orders, accounts) and how their tables connect, so nobody hand-writes the join from orders to accounts again.
  • Dimensions: the attributes you slice by, such as region, plan or signup month.
  • Measures and metrics: the numbers themselves, like revenue or active customers, with their aggregation and filters spelled out once.
  • Access rules: governance in practice, deciding who can see which rows, columns and metrics.
  • Caching and pre-aggregation: stored results and rolled-up tables that keep repeated queries fast and cheap.
  • Query interfaces: the ways consumers ask questions, such as SQL, or REST and GraphQL application programming interfaces (APIs).

These six parts fall into two groups. The first three are definitions: they're the semantic model we described above, and what makes those definitions good is a topic for our model guide, not this page. The last three don't define anything. They decide who gets an answer, how quickly it arrives and through which door, which makes them runtime behaviour. A LookML project or a folder of YAML can define every metric perfectly and still answer nobody until that runtime exists.

Most semantic layers are built from the same six parts, which fall into two groups: definitions and runtime behaviour.

In our view, this split is the most useful lens when you compare products.

A business intelligence (BI) analyst mostly relies on the definitions, because their tool already handles access and speed. An application, an AI agent or a customer inside your product depends on the runtime just as much: an interface it can call, a cache that answers quickly enough, and rules that check who's asking. Two layers with identical models can still serve very different consumers.

Where Can a Semantic Layer Live, and What Does Each Place Cost?

A semantic layer commonly lives in one of four places: inside a single BI tool, in the data platform, next to the transformation code, or as a standalone layer that every tool queries through an API. Here's how we'd compare those common placements.

PlacementWho can query itWhere definitions are maintainedMain strengthMain trade-off
Inside one BI tool (Looker's LookML, Power BI semantic models)Mainly that tool's users; both vendors also offer connectors or endpoints for some outside toolsIn the BI tool's own modelling language or project filesLeast to run; definitions, dashboards and permissions sit in one placeReuse outside the tool is limited and depends on what that vendor exposes
In the data platform (Snowflake semantic views, Databricks metric views)Anything that can query the platform with SQL, plus the platform's own AI featuresAs objects in the warehouse or lakehouse catalogueClose to the data, governed by the platform's existing access controlsTies your definitions to that platform's syntax and roadmap
Next to the transformation code (dbt Semantic Layer, built on MetricFlow)Integrated BI tools, notebooks and applications through its APIsIn YAML files, in the same repo as the transformation modelsMetrics are versioned and reviewed alongside the models they depend onA dependency on dbt's managed platform rather than a service you deploy and operate yourself, and another hop between tool and warehouse
Standalone universal layer (Cube, AtScale)Any tool or app that speaks its interfaces: SQL, REST, GraphQL or BI protocolsIn the layer's own modelling files or projectWidest reach across tools, apps and agents, usually with caching and pre-aggregation built inThe most separate system to deploy, monitor, secure and keep in sync

Read the table top to bottom and a pattern shows up. Each step outward usually lets more kinds of tool reuse the same definitions, which is the whole point of the layer. But the transformation-layer and standalone placements usually add another system your team has to run, and another hop every query travels through before it reaches the warehouse. Caching can win that latency back, though only if someone tunes it. The platform placement looks lighter, and it often is; the cost moves instead to lock-in, because your metric definitions now speak one vendor's dialect.

We've seen teams pick the most universal row because it sounds the most complete, then spend months running a layer that only one dashboard tool ever queries. We've also seen the opposite: a model buried inside one BI tool, copied by hand into a second tool, then a third. Neither team chose badly on paper. They chose without asking who'd be on the other end of the query.

So no row wins outright. Every placement buys reach with operational weight or with dependence on one platform, and the right one depends on who's actually asking.

Who Will Query Your Semantic Layer? Let That Guide Where It Lives

Before you compare architectures, write down every person, tool and system that will ask the layer a question. That list isn't the only factor (the platform your team already runs matters just as much), but it's the one teams most often skip.

In our experience, the conversation usually starts with the most universal option available, because that's how most vendor material frames the choice. A universal layer sounds complete, so it gets shortlisted before anyone has asked who'll actually query it. Then the team finds it's running an extra service, with its own deployments and its own query hop, to feed one dashboard tool. Listing consumers first prevents that. Here's how the list tends to point, as examples rather than rules:

  1. One business intelligence (BI) tool. If every chart and report lives in a single tool, that tool's own semantic model is often enough. It's already maintained and already governed, and it adds no extra hop.
  2. Several BI tools and notebooks. Once analysts query from two dashboarding tools plus Python notebooks, definitions locked inside one tool start to drift. The data platform's layer, or one next to the transformation code, fits better because every consumer already connects there.
  3. Applications and AI agents. Code needs definitions it can reach through an application programming interface (API). Standalone and transformation-layer semantic layers offer this. The dbt Semantic Layer, for instance, documents Java Database Connectivity (JDBC) and GraphQL APIs for downstream tools. Some BI-tool and data-platform layers now expose their definitions as well, so read each vendor's own docs before you assume you need a new system. Serving definitions to anything that asks over an API is the pattern often called headless BI. Agents are a demanding consumer here because they'll ask questions nobody planned a dashboard for, so a semantic layer for AI agents has to give them governed definitions to call rather than SQL to guess at.
  4. Your own customers inside your product. This one is a different kind of consumer. The person asking sits outside your company and must only ever see their own data, which adds requirements we'll come to next.

The pattern shows as you move down the list. A single tool can keep its definitions to itself. Each extra kind of consumer pulls them further out, until they have to be reachable from outside any one tool, by code as well as by people.

How the consumer list tends to point, as examples rather than rules.

What Changes When Your Customers Are the Semantic Layer's Consumer?

When the consumer is a software company's own customers, using analytics inside its product, shared definitions stop being enough. The layer also has to decide, on every request, whose data the answer is allowed to contain.

Three requirements arrive together. Each customer sees only its own rows, which in a multi-tenant product means row-level security (RLS) on every query, not just the obvious ones. The definitions may need to point at a different database per customer, because some accounts want their data kept apart from everyone else's. And access has to travel with the request itself: who's asking, which tenant they belong to, what role they hold. Internal analytics needs access rules too. The difference is exposure; a mistake here shows one paying customer another customer's numbers.

So enforcement has to sit below the presentation layer, at the data, semantic, query, or governed runtime layer. Plenty of semantic layers take this seriously. The best-known layer that sits next to transformation code names embedded analytics among its use cases, and a widely used standalone layer documents row-level security and access control. The question isn't whether the capability exists somewhere. It's whether your layer applies it per request, inside your product, for every consumer that reaches the data.

A common failure mode looks like this. A team scopes its first dashboard with a tenant filter set in the dashboard UI rather than in the query. It works, so nobody revisits it. Later someone adds a new chart, or a partner calls the API directly, and the filter isn't there. The query runs against the shared table and returns another tenant's rows.

The metric definitions were correct the whole time. The scope was never part of them.

Embeddable, our product, treats its data models as its semantic layer for customer-facing analytics. They're defined once in code, in the open-source Cube modelling language, and reused by every chart, dashboard and AI experience in the product. Row-level security comes from the security context passed when an embed token is minted, so the tenant scope is attached before any query runs. Environments can map the same models to a different database per customer. We built it this way because, in our view, customer-facing analytics is won or lost at runtime, not in the model file.

That's the real line between a layer your analysts query and one your customers query. Agreeing on what "active customer" means is necessary in both. When the people asking are your customers, the layer also has to know who's asking on every single request, and refuse to answer for anyone else.

Do You Need a Semantic Layer Now? The Honest Costs, and When Your BI Tool Is Enough

You need a separate semantic layer once several consumers need the same metrics and the layer you already have, in your BI tool or your data platform, can't serve them all. Before that point, it's one more system to run.

The sceptics are right about the costs, so it's worth naming them plainly. It's another component to deploy, secure and monitor. The modelling needs upkeep: every new table, renamed column or changed definition has to land in the layer too, and stay in sync with the pipeline that feeds it. There's a learning curve for whoever maintains it. And it adds an extra hop between the question and the warehouse, which can add latency unless the layer caches or pre-aggregates the queries it sees most.

None of that is a reason to avoid one. It's a reason to wait until the need is real.

If your business intelligence (BI) tool is the only consumer today and you expect it to stay that way, the semantic model inside it is the honest answer. A well-kept Power BI semantic model or LookML project already gives the reports built on it one shared definition of revenue, and putting a separate layer in front of it buys reach you won't use. We'd rather see a team run one tidy model than two half-maintained ones.

The consumer list changes the answer; the architecture diagram doesn't. When a notebook, an application, an AI agent or your own customers join that list and need the metrics your BI tool already defines, those definitions have to live somewhere every consumer can reach. That's when a separate layer starts paying for itself, and the same list tells you where it should sit.

Frequently asked questions

What's the difference between a semantic layer and a context layer?

A semantic layer defines governed metrics, dimensions and joins. A context layer is broader: it adds documentation, lineage and business context, mostly so AI agents can reason over data.

Is a semantic layer part of ETL?

No. Extract, transform, load (ETL) moves and reshapes data. A semantic layer sits downstream and defines what that data means when it's queried.

Does dbt have a semantic layer?

Yes. The dbt Semantic Layer, powered by MetricFlow, defines metrics next to your transformation code and serves them to BI tools and other consumers through APIs.

Is Databricks a semantic layer?

Not by itself; it's a data platform. It does offer metric views in Unity Catalog, which act as a semantic layer inside the platform.

What's the difference between a semantic layer and a metrics layer?

The terms often overlap, but a metrics layer usually means only the metric definitions.