Embedded Analytics ArchitectureBy SumboardOctober 12, 2026

What is a Semantic Layer? Definition, Components & How It Works

A semantic layer maps raw tables to named business metrics and dimensions, defined once, so every dashboard, embedded view and AI assistant computes the same number the same way.

5 min read
What is a Semantic Layer? Definition, Components & How It Works

A Semantic Layer Is the Place Where a Business Defines Its Metrics Once

A semantic layer is a layer of definitions between raw data and the people or tools that ask questions of it. It maps tables and columns to business terms such as revenue, active customer or order, and it states how each term is calculated. A dashboard, an embedded report or an AI assistant then asks for "revenue by month" instead of writing its own SQL, and all three get the same number.

Without one, each tool carries its own copy of the logic. A finance dashboard filters out refunds, a product dashboard does not, and two charts labelled "Revenue" disagree. The semantic layer keeps the definition in one place, and the consumers read from it.

What a Semantic Layer Defines

The exact contents vary by product, but most semantic layers describe the same five things.

  • Entities. The business objects the data is about: customers, orders, subscriptions, tickets. Each maps to one or more tables.
  • Dimensions. Attributes you can group or filter by: country, plan, signup month, sales channel.
  • Measures and metrics. Calculations with a fixed rule: sum of order value excluding refunds, count of distinct customers with a login in the last 30 days, monthly recurring revenue.
  • Relationships. How entities join: an order belongs to one customer, a customer has many subscriptions. The layer writes the joins so each consumer does not have to. A wrong or ambiguous join path in the model is inherited by every consumer, which is why the model itself needs tests.
  • Rules and context. Time grain, default filters, currency handling and, in some products, who may see which rows. Descriptions written for humans often sit here too.

How a Semantic Layer Turns a Question Into a Query

When a consumer asks for a metric, the semantic layer does three things in order.

  1. Resolves the names. "Revenue by country, last quarter" becomes a specific measure, a specific dimension and a specific date range.
  2. Builds the query. It writes the SQL (or the warehouse's own query language) with the right joins, filters and aggregation.
  3. Returns the result to whoever asked, often with the metric's definition attached so the reader can see what was counted.

The consumer does not write the joins. That is the point: the person or program asking the question cannot introduce a different definition by accident.

Where a Semantic Layer Can Live

There is no single location. Teams usually choose one of four.

Where it livesExample of the patternTrade-off
Inside a BI toolA modelling layer that only that tool's dashboards readSimple to start; reuse by other tools depends on what the BI tool exposes
In the transformation layerMetric definitions kept next to data models in version controlClose to the data team; consumers need a way to query it
As a standalone serviceA separate semantic API that any tool can callReusable everywhere; one more system to run and secure
Inside the product's own codeMetric logic written into the application backendFull control; the logic is easy to duplicate across endpoints

Why Embedded Analytics Raises the Stakes

In internal reporting, a disagreement between two dashboards costs a meeting. In a product that shows analytics to its own customers, it costs trust: the customer sees one number in the app and a different one in an export or an email report, and assumes the product is wrong.

Embedded analytics adds a second requirement on top of consistent definitions. Every customer must see the same calculation applied only to their own rows. The definition of revenue is shared across all tenants; the data it runs on is not. Those are two separate controls. The semantic layer owns the first. Row access is usually enforced through row-level security in the database, the semantic layer or the service in front of both. In multi-tenant analytics both have to hold at the same time.

What a Semantic Layer Does Not Solve

A semantic layer holds definitions; data quality is checked elsewhere. It computes each metric the way the model defines it, from whatever data it is given, including data that is late, duplicated or wrong. It also does not decide what a metric should mean; that is a business decision someone has to make and own. And it does not make a dashboard fast on its own: query speed still depends on the warehouse, caching and how the query is shaped.

It also needs an owner. Definitions drift when nobody reviews changes, and a semantic layer with two competing definitions of "active customer" recreates the problem it was meant to solve.

Semantic Layers and AI Assistants

Language models that answer data questions have made semantic layers more visible. A model writing SQL straight against a warehouse has to infer what each column means. Given a semantic layer, it can pick from named, documented metrics instead, and its answer can be traced back to a definition a person agreed on.

That narrows the room for a confident wrong number; it does not close it. The model can still pick the wrong metric for an ambiguous question. Answers still need a visible definition and a way for the reader to check what was counted.

How to Tell Whether You Need One

A semantic layer starts to pay for itself when at least one of these is true:

  • The same metric appears in more than one tool and the numbers have disagreed.
  • Customers see analytics inside your product, so a wrong number is visible outside the company.
  • You want an AI assistant or an API to answer questions against your data without writing raw SQL.
  • More than one team writes metric logic and nobody can say which version is current.

If none of these apply yet, keeping metric logic in one well-reviewed place in your existing tool is often enough. The layer becomes worth its cost when the number of consumers grows.

Frequently asked questions

Is a semantic layer the same as a data warehouse?▾
No. The warehouse stores and computes data. The semantic layer sits above it and describes what the data means: which column is revenue, how an active customer is counted, which tables join on which keys. Most semantic layers do not store data of their own; they translate a request for a named metric into a query the warehouse runs.
What is the difference between a semantic layer and a metrics layer?▾
The terms overlap. A metrics layer usually means the part that defines measures such as revenue or churn and the rules for aggregating them. A semantic layer usually covers more: entities, dimensions, relationships between tables and, in some products, access rules. Many vendors use the two names for the same component, so compare what each one defines rather than the label.
Why does a semantic layer matter for AI assistants?▾
A language model that writes SQL against raw tables has to guess which column means revenue and how tables join. A semantic layer gives it named, documented metrics to choose from, so the question resolves to a definition someone already agreed on. It narrows the guesswork; it does not remove the need to check the answer.