Last updated: November 2026. Written by the Polar Analytics team. dbt facts come from dbt Labs' public docs and pricing page as of November 2026.
Ask three people at a $20M brand for last month's blended CAC and you can get three numbers. The ads lead divides Meta and Google spend by new customers in Shopify. Finance adds agency fees and influencer costs. The dashboard counts any customer without a previous order on that store as new, even if they bought on Amazon last year. Nobody is wrong. They are using three definitions.
A semantic layer fixes this by defining each metric once and serving that definition to every dashboard, spreadsheet and AI agent. The question for an ecommerce team is where that layer should live: in a dbt project your data team builds and maintains, or in a managed layer that ships with commerce definitions already written.
A semantic layer sits between your data and every place that shows a number. Data comes in from Shopify, ad platforms and email tools, lands in a warehouse, and gets cleaned into data models (orders, customers, ad spend). The semantic layer reads those models and turns them into business terms: net sales, new customers, blended CAC, contribution margin.

Three ideas make it work:
Vendors use these words loosely. Here is how they relate:

In this article, "semantic layer" means the full layer: models, metrics, joins and the API that serves them.
The dbt Semantic Layer lets a data team define metrics in YAML files inside their dbt project, on top of models they have already built. It is powered by MetricFlow, which reads those definitions and generates the SQL, joins included, each time someone asks for a metric by a dimension or a time grain.
What matters for a buying decision, as of November 2026:
It is a strong engine for teams that already model their data in dbt. It does not model the data for you, and it does not know what a Shopify refund is.
A managed semantic layer comes with the pipeline, the warehouse, the data model and the metric definitions. You connect Shopify, your ad accounts and your email tool, and metrics like net sales, new customer revenue, blended ROAS, contribution margin and LTV already exist, defined the same way for every channel.
You still customize. The difference is that you start from hundreds of commerce definitions and change the few that are specific to your business, instead of starting from empty YAML files.
Most brands do not choose between two options. They choose between four, and many start with the first one without deciding anything.
| Method | Where the definition lives | Who maintains it | Commerce definitions included | AI agent access | Main cost |
|---|---|---|---|---|---|
| Metrics inside a BI tool | Each dashboard or BI model | Whoever builds the dashboard | No | Through the BI tool's own AI, if any | BI licences, plus time spent reconciling numbers |
| dbt Semantic Layer (MetricFlow) | YAML in your dbt project | Analytics engineers | No, you write them on top of your own models | dbt MCP server and APIs (paid dbt plans) | dbt seats, warehouse compute, analytics engineering time |
| Universal semantic layer (for example Cube) | Data models in the semantic layer tool | Data engineers | No | APIs and integrations | Tool licence or hosting, warehouse, engineering time |
| Polar (managed ecommerce layer) | Polar's semantic layer, on a dedicated Snowflake database per brand | Polar ships the definitions, your team edits them without code | Yes, 400+ ecommerce metrics | Polar MCP, Ask Polar, Polar Operator | Polar subscription, priced on annual GMV |
The first method is where metric chaos usually starts. The three others all solve it. What differs is who does the modeling work and what the layer knows about commerce.
Defining a metric in MetricFlow is short. Here is blended CAC in the classic MetricFlow spec, which dbt 1.12 still accepts (1.12 also adds a newer spec built on simple metrics, the idea is the same):
semantic_models:
- name: orders
model: ref('fct_orders')
defaults:
agg_time_dimension: order_date
entities:
- name: order_id
type: primary
dimensions:
- name: order_date
type: time
type_params:
time_granularity: day
measures:
- name: new_customers
agg: count_distinct
expr: case when is_first_order then customer_id end
metrics:
- name: new_customers
type: simple
type_params:
measure: new_customers
- name: blended_cac
label: Blended CAC
type: ratio
type_params:
numerator: total_ad_spend # simple metric from an ad spend model
denominator: new_customers
About thirty lines. The work is everything those lines assume already exists:
fct_orders has to be right. Shopify order data has edits, partial refunds, exchanges, cancelled orders, test orders and draft orders. Net sales only matches finance if each of those is handled the same way every day.is_first_order has to mean something. First order on this store, on any of your stores, or across Shopify and Amazon? Each answer gives a different new customer count, so a different CAC.total_ad_spend has to be complete. Meta, Google, TikTok, Pinterest and Amazon Ads each name campaigns, currencies and time zones differently. Someone has to land, clean and union all of them, and fix the pipeline when an API changes.
With dbt, your team writes and maintains all of this as models. With a managed layer, the vendor ships it and keeps it running when Shopify or Meta change their APIs. So the choice is about who owns that upstream work, not about writing YAML or clicking in a UI.
Consistent definitions are half the job. The other half is controlling who can see and change them. This matters most for brands with several stores, several brands or an outside agency in the account.
| Capability | dbt Semantic Layer | Polar |
|---|---|---|
| Access control | Project and environment permissions in the dbt platform. Semantic Layer queries authenticate with service tokens or personal access tokens mapped to warehouse credentials | Four default roles (Admin, Analyst, Viewer, Connector) and custom roles with access set per dashboard, folder and report. Data exploration and Ask Polar are separate toggles |
| Row-level security | Enforced by the warehouse: the Semantic Layer respects the access policies tied to the credential it uses | No row-level rules. Roles limit dashboards, folders, reports, metrics and app features, and can hide customer details. To isolate one brand, use a separate workspace |
| Metric ownership | Groups with a named owner; metrics can belong to a group | Creator and creation date are recorded on metrics, dimensions and dashboards. No assigned owner field |
| Lineage | Lineage graph from sources to metrics in dbt Catalog (Starter plan and above) | Each custom metric shows the formula it is built from. No lineage graph |
| Audit log | Log of user and system events, kept at least 12 months (Enterprise and Enterprise+ plans) | Creator is recorded on every object, last editor on reports. No customer-facing audit log |
| Definition versioning | Git: branches, pull requests and code review | Version history with restore for dashboards, reports, metrics and dimensions. No branches |
| Multi-store and multi-brand | You model it, for example with a store dimension in your models | Several Shopify stores in one workspace, with a store filter and no per-store fee. Customers are not matched across stores |
Sources: dbt Semantic Layer FAQs, dbt docs on groups, Catalog and the audit log, and Polar's help center, as of November 2026.
The table shows the trade-off. dbt gives a data team code-level governance: lineage, owners, audit logs and pull requests. Polar gets a commerce team to a trusted number faster. Most brands under $50M in GMV need the second first.
The dbt Semantic Layer is cheap on its own. Starter is $100 per seat per month. The full cost of running it for commerce metrics includes:
A managed layer bundles ingestion, warehouse, modeling and definitions into one subscription. You pay more for the software and much less in engineering time. For a brand without an analytics engineer, the managed layer usually costs less in total. For a brand with a data team already running dbt, adding the Semantic Layer can cost very little.
The two approaches are not exclusive. A setup that works for brands with a data team:
This keeps one definition per commerce metric without throwing away work your team has already done.
Polar is a managed semantic layer built for ecommerce, and the base of the Polar Data Platform. Here is how Polar's semantic layer works in practice:
Where Polar is not the right fit: Shopify has to be your core store, and Polar does not replace dbt for metrics outside commerce. If most of your metrics are finance or operations metrics, keep them in dbt and use Polar for the commerce side.
For a ranking of ecommerce tools by the quality of their semantic layer, see our guide to the best semantic layer for ecommerce data.
Want to see your commerce metrics defined on day one? Book a demo.
Partly. MetricFlow is open source under Apache 2.0, and dbt Core users can define metrics and query them locally. Querying through the Semantic Layer APIs and integrations needs a paid dbt platform plan: Starter at $100 per seat per month with 5,000 queried metrics, or a custom Enterprise plan.
MetricFlow is the engine: it reads metric definitions and generates SQL. The dbt Semantic Layer is the hosted service around it, with APIs, caching on Enterprise plans, access control and integrations with BI and AI tools.
In practice, mostly yes. A metrics layer focuses on metric definitions. A semantic layer also covers entities, dimensions and the joins between them. The dbt Semantic Layer and Polar both cover entities, dimensions and joins, not only metrics.
Yes. Polar can read tables and views from your own Snowflake or BigQuery, so models your team builds in dbt can feed Polar's commerce metrics. Teams usually keep non-commerce metrics in dbt.
If you want consistent answers, yes. Without one, an agent writes its own SQL against raw tables and can define the same metric differently from one question to the next. With one, it asks for a metric by name and gets the governed definition. Both the dbt Semantic Layer (through the dbt MCP server) and Polar (through the Polar MCP) give agents that access.
