A semantic layer is the part of a data stack that translates raw tables into business terms, such as revenue, customer or order, and stores one agreed definition for each metric. Every tool that reads the data, from a dashboard to a spreadsheet to an AI assistant, then asks the semantic layer for "net revenue" instead of writing its own calculation. This answer explains what a semantic layer contains, why an ecommerce brand runs into the problem it solves, where it can live, and how to start without buying anything. It is from Brand Media Works, an AI consulting and marketing data engineering firm for ecommerce brands. Facts are from each vendor's documentation and from Wikipedia, read on 12 November 2026, and from the Shopify Help Center, read on 7 November 2026.

What is a semantic layer?

Wikipedia defines it as "a business representation of corporate data that helps end users" find and use data in common business terms. In its words, a semantic layer "maps complex data into familiar business terms such as product, customer, or revenue."

Snowflake's documentation puts the problem it solves plainly: "Semantic views address the mismatch between how business users describe data and how it’s stored in database schemas." Its example is a revenue figure stored "in a table column named amt_ttl_pre_dsc," which no marketer would find on their own.

The idea is not new. Wikipedia notes that Business Objects obtained a US patent for the approach in September 1996, and that semantic layer functionality "was historically embedded within individual Business Intelligence" platforms. What changed is that the layer can now sit outside any one BI tool. The same Wikipedia article says these standalone products go by names such as universal semantic layer, metrics layer and headless BI, and lists AtScale, Cube and dbt among them.

Why an ecommerce brand needs one metric definition

Most brands do not have a data problem. They have a definitions problem. Take revenue. Shopify's own reports define three versions:

  • Gross sales. Shopify notes that "Pending, canceled, and unpaid orders are included."
  • Net sales: "gross sales - discounts - sales reversals."
  • Total sales: net sales plus "taxes + duties + shipping charges + fees."

All three are correct. The trouble starts when the founder's dashboard uses total sales, the media buyer uses net sales and the finance sheet uses a figure from the payment processor. Here is an invented example of one month for a Shopify brand that spent $20,000 on ads (our arithmetic):

Revenue definitionRevenueROAS on $20,000 of ad spend
Gross sales$100,0005.00
Net sales (after $8,000 of discounts and $6,000 of returns)$86,0004.30
Total sales (net sales plus $6,880 of tax and $4,000 of shipping)$96,8804.84

Same store, same month, three ROAS figures. Nobody made a mistake, yet a 4.30 and a 5.00 lead to different budget decisions. Snowflake's documentation describes the same pattern at company scale: "Without a semantic view, dozens of inconsistent calculations might exist throughout different reports and applications, often with incorrect aggregation methods leading to erroneous results."

A semantic layer fixes this by making one definition the default. Snowflake's own example defines net revenue "consistently as a metric with the correct aggregation: SUM(gross_revenue * (1 - discount))." Once that is written down, every report that asks for net revenue gets the same answer.

What goes in a semantic layer

The vendors use slightly different words, but the parts are the same:

PartWhat it isEcommerce example
MetricsSnowflake: "Metrics are quantifiable measures of business performance calculated by aggregating facts or other columns"Net sales, orders, new customers, ad spend, MER, contribution margin
DimensionsSnowflake: "Dimensions represent categorical attributes."Channel, campaign, product, country, first-order month
Entities and joinsThe business objects and how their tables connectOrders join to customers, and line items join to products
Access rulesWho may see which rows or metricsThe agency sees ad metrics but not margin

The key design choice is keeping metrics separate from dimensions. Databricks explains why: "Standard views lock in aggregations and groupings at creation time." With a metric view, a metric such as "sum of revenue divided by distinct customer count" is defined once, "and users can group by any available field." For a brand, that means revenue per customer is calculated the same way whether someone looks at it by channel, by product or by month.

Ratios are where shared definitions matter most. A ratio such as ROAS or average order value has to be computed from totals, not averaged across rows, and a semantic layer applies that rule every time.

Where a semantic layer can live

OptionWhere the definitions sitWorth knowing
dbt Semantic LayerIn the dbt project, the modeling layerdbt says it moves "metric definitions out of the BI layer and into the modeling layer." Its docs say you must be on a dbt Starter or Enterprise-tier account to define and query metrics.
Snowflake semantic viewsInside the Snowflake database, as a schema-level objectSnowflake notes that "Semantic views are considered metadata."
Databricks metric viewsIn Unity CatalogDatabricks says you can "Query metric views from Power BI, Tableau, Sigma, and other external BI tools."
CubeA standalone layer between the warehouse and every toolIts core is open source, and "Models are written in YAML or JavaScript and managed in version control."
Your BI tool's own modelInside one BI toolWorks well if everyone uses that one tool. It does not help a spreadsheet or an AI assistant that reads the warehouse directly.

Our view: for a Shopify brand on BigQuery or Snowflake, the right home is usually wherever the data team already models data. A brand already using dbt has a natural place to start. A brand without a data team can begin with plain warehouse views and a written definitions sheet, then move to a dedicated layer when more than one tool needs the same metrics.

Why semantic layers matter more with AI

AI assistants that answer questions about company data usually write SQL against the warehouse. Without shared definitions, each answer can calculate revenue its own way. Cube, which sells a semantic layer, makes the point directly in its documentation: "Without one, agents writing SQL against a warehouse end up with inconsistent metrics and ungoverned access."

Vendors are building for this. dbt's documentation says "AI tools like Claude and ChatGPT can connect to the Semantic Layer through the dbt MCP server," and Cube says "Access control runs at the semantic layer, so the same policies apply to every consumer." Our view is that a brand planning to let anyone ask an AI tool "what was our ROAS last month?" should agree what ROAS means first.

Book a discovery call

How to start: one metric definition at a time

This is our recommendation for an ecommerce brand. None of it needs a new tool on day one.

  1. List the metrics that reach budget meetings. For most brands that is 10 to 15: net sales, orders, new customers, returning customers, average order value, ad spend, MER, ROAS by channel, contribution margin and LTV.
  2. Write one definition for each. Give the formula, the source table, what is included and excluded (canceled orders, tax, shipping, returns), the time zone and the owner. Put it where everyone can read it.
  3. Model the data as a simple star schema. Snowflake's documentation says: "We recommend starting with a simple star schema." In practice that means an orders fact table with customer, product, channel and date tables around it.
  4. Build each metric once in the warehouse, as a view or in your semantic layer tool, and point every dashboard at it. Our guide to the marketing data warehouse covers the layer underneath.
  5. Change definitions in one place only. dbt describes the benefit: when a definition changes, "it’s refreshed everywhere it’s invoked and creates consistency across all applications."
  6. Tie the totals out. Net sales in the semantic layer should match Shopify's net sales for the same period and time zone. If it does not, fix the definition before anyone uses the dashboard.

For the metrics themselves, our answer on MER, ROAS and contribution margin explains which to use for which decision, and our ecommerce KPI dashboard guide shows how to lay them out. Brand Media Works builds this kind of metric layer on a brand's own warehouse as part of its marketing data engineering work.

Frequently asked questions

What is a semantic layer in simple terms?

It is a shared dictionary for your data. It says what each business term, such as net sales or new customer, means and how to calculate it from the raw tables, so every tool gives the same number.

What is the difference between a semantic layer and a data warehouse?

The data warehouse stores the data. The semantic layer sits on top and describes it in business terms, with one definition per metric. A warehouse without a semantic layer still works, but each dashboard and analyst has to define the metrics again.

Is a semantic layer the same as a metrics layer?

Mostly, yes. Wikipedia lists "metrics layer" and "headless BI" as other names for standalone semantic layers. Some people use "metrics layer" for the part that only defines metrics, without access rules or caching.

Is dbt a semantic layer?

dbt is mainly a tool for transforming data in the warehouse. Its Starter and Enterprise-tier plans include the dbt Semantic Layer, which its documentation says lets teams "define metrics on top of existing models."

Does a small Shopify brand need a semantic layer?

Our view is that every brand needs one set of metric definitions, but not necessarily a semantic layer product. A written definitions sheet plus warehouse views is enough until several tools or people need the same metrics. Data Studio (formerly Looker Studio) dashboards, spreadsheets and an AI assistant all reading one set of views is a sensible first step.

Facts from the Brand Media Works competitor register, as published by each source on the date shown. The revenue example is invented, and its figures are our arithmetic. The selection steps and the metric list are ours. Brand Media Works does not publish its own fees.

Sources cited

  1. Wikipedia (en.wikipedia.org), Semantic layer, last edited 8 November 2026, read 12 November 2026.
  2. Snowflake documentation (docs.snowflake.com), Overview of semantic views, read 12 November 2026.
  3. dbt Developer Hub (docs.getdbt.com), dbt Semantic Layer, last updated 29 September 2026, read 12 November 2026.
  4. Databricks documentation (docs.databricks.com), Unity Catalog metric views, last updated 29 October 2026, read 12 November 2026.
  5. Cube documentation (cube.dev), Introduction, read 12 November 2026.
  6. Shopify Help Center (help.shopify.com), Sales reports, read 7 November 2026.