Best Semantic Layers in 2026: dbt MetricFlow vs Cube vs Snowflake
The 3 most popular semantic layers (dbt MetricFlow, Cube, Snowflake semantic views), the fourth option (no semantic layer), how to use each with the nao analytics agent, and which one to pick.

22 November 2026
By Claire GouzeFounder @ naoThe semantic layer is one of the most discussed topics in data right now.
A semantic layer stores your business definitions (metrics, dimensions, entities and the joins between them) once, and compiles every request into SQL from them. The three most popular today are dbt MetricFlow, Cube and Snowflake semantic views. All three work with nao, the open source analytics agent: MetricFlow natively, Snowflake semantic views as synced context, Cube through its MCP server.
There is a fourth option most comparisons leave out: no semantic layer. A rules file listing each metric and its source table, documented columns and a data model built for agents. In our benchmark, that setup reached 86% correct answers, against 82% for a MetricFlow layer after four rounds of manual work. So this post compares four options, not three: if you want a semantic layer for your agent, pick MetricFlow; if you don't have one yet, start without.
The 3 most popular semantic layers, and the option of none
dbt MetricFlow
MetricFlow is the SQL generation engine behind the dbt Semantic Layer. You define semantic models, entities, dimensions and metrics (simple, ratio, cumulative, derived, conversion) in YAML, in your dbt project, and MetricFlow builds the joins and the SQL, avoiding fan-out and chasm joins. It is open source under Apache 2.0. Starting with dbt v1.12, it can read semantic models written as Ossie documents (MetricFlow docs).
The same example in each option below: a revenue metric on an orders table. In MetricFlow, with the YAML spec of dbt v1.12 and later (older projects declare measures in a semantic_models: block):
Its strength: your metrics sit next to the models they aggregate, and they are reviewed in the same pull requests. Its catch for agents: the dbt Semantic Layer APIs, and the integrations built on them, require a dbt platform Starter or Enterprise account (dbt Semantic Layer docs).
Cube
Cube is a semantic layer (Cube Core, open source, Apache 2.0 by default) plus an agentic analytics platform (Cube Cloud). You define cubes (measures, dimensions, joins) and views in YAML or JavaScript, in version control, and query them through a Postgres-compatible SQL API, REST, GraphQL or the Meta API. Pre-aggregations in Cube Store and access policies as code are its extra strengths (Cube docs).
It shines when many apps or tenants hit the same data. A practitioner on r/PostgreSQL put Cube Core in front of a Postgres replica, with row filters compiled from a signed JWT and rollups in Cube Store, and reported p95 dashboard waits going from 14 seconds to under 60 ms. Their warning: watch dimension cardinality in rollups.
Snowflake semantic views
Semantic views are schema-level objects in Snowflake that store logical tables, relationships, facts, dimensions and metrics. You create them with CREATE SEMANTIC VIEW, a YAML spec, or the Autopilot and Semantic Studio UIs, and query them with SELECT ... FROM SEMANTIC_VIEW(...) or SELECT with AGG() (Snowflake docs). Cortex Analyst and Cortex Agents use them to generate SQL.
No extra infrastructure if you are all-in on Snowflake. The catch: they only work in Snowflake, and your definitions live in Snowflake, not next to your dbt models.
Option 4: no semantic layer
The agent writes SQL from the context your data team maintains: a rules file with each metric's definition and source-of-truth table, column descriptions, dbt docs, and tables modeled so the right one is obvious. Nothing to compile, no extra infrastructure, and no question falls outside a layer's scope. The catch: definitions live in prose and docs, so they are only as consistent as your tests. That is why this option comes with an evaluation suite. We tested it against MetricFlow in our semantic layer impact study, and it came out ahead on accuracy, speed and cost.
The same metric, written in the RULES.md the agent reads:
At a glance
| dbt MetricFlow | Cube | Snowflake semantic views | No semantic layer | |
|---|---|---|---|---|
| Open source | Yes, Apache 2.0 | Cube Core, Apache 2.0 by default | No, a Snowflake feature | Nothing to license |
| Where definitions live | YAML in your dbt project | YAML or JavaScript, in version control | In Snowflake | A rules file and docs, in your repo |
| Building blocks | Semantic models, entities, dimensions, metrics | Cubes (measures, dimensions, joins) and views | Logical tables, relationships, facts, dimensions, metrics | Metric definitions, column descriptions, clean models, tests |
| Warehouses | Snowflake, BigQuery, Databricks, Redshift, Postgres | Connects to your warehouse or database | Snowflake only | Any |
| Best for | Teams already on dbt | Many apps or tenants on the same data | Teams all-in on Snowflake | Most teams starting an agent, and questions beyond predefined metrics |
We also review Cube as an agent in our nao vs Cube comparison, and Snowflake's agent in our Snowflake Cortex review.
How to use each semantic layer with nao
nao is an open source analytics agent: your data team builds its context (schemas, dbt docs, rules, skills) as files, and business users ask questions in plain English. A semantic layer is one more piece of that context.
dbt MetricFlow: native
Point nao_config.yaml at the semantic_manifest.json that dbt parse produces:
Then run nao sync. nao writes one file per metric in semantics/metrics/ and gives the agent an execute_semantic_query tool that takes metrics, dimensions and filters instead of SQL. MetricFlow runs inside nao as a SQL compiler only: no call to dbt Cloud, no Semantic Layer plan, and the compiled SQL goes through the same read-only checks as any other query.
Admins pick a mode under Settings -> Agent -> SQL: Semantics first (default, falls back to SQL for what the layer doesn't cover), Semantics only, or Don't use semantics. Full setup in the semantic layer docs.
Snowflake semantic views: synced as context
Nothing to configure. When nao sync runs against Snowflake, it imports the semantic views in your account (metrics, dimensions, relationships) into a definition.md per view, next to the table metadata. The agent reads them as the intended way to query and aggregate the data. See Snowflake semantic views in the databases docs.
Cube: through its MCP server
nao has no native Cube integration today. Cube hosts an MCP server for its platform, and nao's agent can call any MCP server you declare in agent/mcps/mcp.json, including remote HTTP servers (MCP docs). Expect the trade-off we measured with the dbt MCP: governed answers, more tool calls, slower answers.
No semantic layer: rules, docs and tests
This is nao's default. nao sync writes your warehouse metadata and dbt docs as files, you describe each metric and its source table in RULES.md, and nao test checks the agent's answers against the SQL you expect. The method is in our context engineering guide and in 4 steps to improve your analytics agent reliability from 45% to 86%; the data model side in how to do data modeling for AI agents.
Do you really need a semantic layer?
Before you pick one: no, it's not mandatory.
A semantic layer solves computation, not orientation. Answering "what was our MRR last month?" takes two steps: finding which metric and which table the question means (MRR? ARR? billing month or subscription month?), then computing it. A semantic layer makes the second step deterministic. The first step, where agents actually fail, is still the agent's job.
Our numbers, on our own agent, 40 tests over 12 tables:
| Setup | Correct answers |
|---|---|
| AI-generated MetricFlow semantic layer, as the only way to query | 4% to 13% (most questions fell outside its scope) |
| Same layer after 4 rounds of manual work | 82% |
| No semantic layer: rules file, documented columns, a data model built for agents | 86% |
The semantic layer version was also slower and more expensive, because every answer went through MCP tool calls. We wrote up each step:
- What context has the most impact on analytics agent performance?: the first study, where the semantic layer was so restrictive the agent answered almost nothing.
- What is the impact of a semantic layer on analytics agent performance?: MetricFlow against a plain rules file, on accuracy, speed and cost.
- How to make the semantic layer work for analytics agents: the 4 steps that took the semantic layer agent to 82%.
- 5 steps to deploy an analytics agent on dbt MCP: what the dbt Semantic Layer MCP needs (a Starter license) and where it is harder to go outside the layer.
So:
- You don't have a semantic layer: don't start by building one. Test the agent on what you already have (schema, dbt docs, a rules file listing each metric and its source-of-truth table) and fix the data model where tests fail. That's how we went from 45% to 86%.
- You already have one (MetricFlow, Cube, Snowflake semantic views, LookML, TMDL): use it as context, next to your rules and docs, and let your tests tell you whether querying through it helps.
- When it starts to pay off: our hypothesis is that it matters more as the number of tables and the number of teams sharing the same metrics grow.
In the current debate, WisdomAI's CPO called the semantic layer "necessary, but not sufficient" for chat over data (Chain of Thought). We agree with "not sufficient", not with "necessary": picking the right metric is context engineering work, with business definitions, rules and a data model built for agents.
Whatever you choose, test it: write 20 to 40 metric questions, run them with and without the layer using nao's evaluation framework, and keep the layer only if it moves your numbers.
Summary: the best semantic layer to use with nao
| Semantic layer | How nao uses it | Setup | Our take |
|---|---|---|---|
| dbt MetricFlow | Native: compiled inside nao, queried with execute_semantic_query | Point nao_config.yaml at semantic_manifest.json | Best choice if you want a semantic layer |
| Snowflake semantic views | Synced as context by nao sync | Nothing to configure | Use the ones you have, don't build new ones for nao |
| Cube | Through Cube's MCP server | Declare it in agent/mcps/mcp.json | Works, but slower: not native |
| No semantic layer | Default: rules file, docs and dbt context, tested with nao test | Write RULES.md, run nao test | Best place to start: 86% in our benchmark |
If you want a semantic layer with nao, use dbt MetricFlow. It is open source, lives in your dbt project next to the models it aggregates, needs no dbt Cloud plan with nao, and is the only one nao compiles natively, with a fallback to SQL for what it doesn't cover. If you don't have one yet, start without: rules, a clean data model and tests got us to 86%.
nao is open source: github.com/getnao/nao ยท docs

Claire
For nao team
Frequently Asked Questions
Related articles
product updates
Launching nao agentic BI builder
Sign up on nao Cloud, connect your warehouse, add business context, and deploy your own agentic BI to the whole company from the nao UI. No CLI needed. Still open source.
Buyer's Guide
How to Choose Your First BI Tool: Top 3 Free Options
The 3 free BI tools companies adopt when they start their analytics journey, compared on features, pricing, setup and how far they scale.
Buyer's Guide
Looker Conversational Analytics, Data Agents and Data Apps
Looker Conversational Analytics, data agents and Data Apps reviewed: how Gemini in Looker works, its limits, and nao as the open source alternative.