---
title: "dbt Semantic Layer vs warehouse-native semantic views | Rig"
description: "dbt keeps metrics in your project; Snowflake semantic views and Databricks metric views keep them in the engine. Neither alone decides which agent may query them."
canonical: "https://rig.so/blog/dbt-semantic-layer-vs-warehouse-native-semantic-views"
format: markdown
---

[Data context and governance](https://rig.so/blog/data-context)

# If dbt holds the metrics, who decides who can query them?

The dbt Semantic Layer keeps metric definitions in your dbt project and serves them through MetricFlow. Warehouse-native objects, such as Snowflake semantic views and Databricks metric views, store the definitions inside the engine, under that engine's privileges. Either can hold your metrics well, and neither decides on its own which person or agent may query them.

By [Toby Mather](https://rig.so/blog/authors/toby-mather) · Published 20 November 2026

[Request an architecture diagram for your stack](https://rig.so/book-demo?offer=architecture_diagram&from=%2Fblog%2Fdbt-semantic-layer-vs-warehouse-native-semantic-views)

## Key takeaways

- The dbt Semantic Layer is powered by MetricFlow and needs a dbt Starter or Enterprise-tier account. Tools reach it through its JDBC, GraphQL and Python interfaces, or through the dbt MCP server.
- Snowflake semantic views and Databricks metric views are objects in the warehouse. You query them with SQL, and the warehouse's own grants decide who can read them.
- With dbt, a query runs under a warehouse credential tied to a service token, or under each user's own credential if they use a personal access token.
- Where a metric is defined and who may query it are two separate decisions. Agents need their own role, row limits and a log whichever option you pick.
- Plenty of teams end up with both. Give each metric one owner and sync it to the other places, so revenue has one definition.

1. 01**Warehouse tables**
   
   Your modelled data
2. 02**dbt Semantic Layer / MetricFlow**
   
   or warehouse-native views
3. 03**BI tools and agents**
   
   Ask for the metric

The same warehouse tables can feed two semantic paths, and both end at the BI tools and agents that ask the questions.

## Where does the metric definition live?

In dbt, metrics sit in your dbt project next to the models they are built on. You define semantic models and metrics once, and MetricFlow works out the joins when someone asks for revenue by region. Because the definition lives in the project, it goes through the same pull requests and reviews as the rest of your dbt code.

In a warehouse-native view, the definition is an object in the database. Snowflake describes a semantic view as a schema-level object made of logical tables, relationships, facts, dimensions and metrics. Databricks metric views are registered in Unity Catalog and keep measures separate from dimensions, so you can group a measure by any available field at query time without rewriting the calculation.

The practical difference is who maintains it and which tools can see it. A dbt metric belongs to whoever owns the dbt project, while a semantic view belongs to the warehouse, where any tool that can run SQL against it can read it.

## How is each one queried?

The dbt Semantic Layer is reached through its own interfaces. dbt documents a JDBC driver, a GraphQL API and a Python SDK, and AI tools such as Claude and ChatGPT can connect through the dbt MCP server. The request goes to dbt, MetricFlow writes the SQL, and the warehouse runs it.

Warehouse-native views are queried with SQL in the warehouse itself. Snowflake says you query a semantic view in a SELECT statement, and Cortex Analyst and Cortex Agents read the view definition when they answer questions. Databricks lists SQL editors, notebooks, dashboards, Genie Agents and alerts as places that query metric views, and it can materialize common aggregations to speed them up.

## Who controls access, and who owns the definition?

dbt's setup docs describe two paths. A service token is tied to a warehouse credential that an admin configures, and every query sent with that token runs under that one credential. A personal access token runs queries under the user's own warehouse credential. On Enterprise plans you can create several credentials per project, for example one for the finance schemas. dbt also notes that results served from its cache do not have the table-level security context applied at query time.

Warehouse-native views use the warehouse's privileges directly. A Snowflake role needs the right grants on the semantic view, and a Databricks user needs Unity Catalog privileges on the metric view and its sources. That keeps access in one place, but only for people and tools that log in to the warehouse as themselves.

Neither option knows which AI agent is asking unless you give the agent an identity of its own. If an agent shares a service token or a person's login, the warehouse sees that token or that person, and the audit trail cannot tell the agent apart from everyone else using it.

## How do AI agents use each one?

Agents need a definition they can trust and a way to ask for it by name. With dbt, the agent calls the Semantic Layer through MCP or an API and gets back numbers built from the certified metric. With warehouse-native views, the agent writes SQL against the view, or a warehouse agent such as Cortex Analyst or Genie reads the view for it.

Both are a big step up from an agent guessing joins over raw tables. An agent also needs to know which tables mean what, which metric to use for a board report, and which rows it may see. A semantic layer is a dictionary of business numbers, and it is one part of that work. The rest is the map of your data (context) and governed access: a role, a row limit and a log for every agent.

## When is dbt the better fit, and when is warehouse-native?

Choose by where your team already works and how many engines you run. The table below is a starting point, and many teams will match more than one row.

| Situation | Usually fits | Why |
| --- | --- | --- |
| Your analytics engineers already own a large dbt project | dbt Semantic Layer | Metrics live next to the models and go through the same review |
| You run more than one warehouse or engine | dbt Semantic Layer, or an open format | One definition can serve several engines |
| Most consumers are Snowflake or Databricks tools | Warehouse-native views | Cortex Analyst and Genie read the native objects directly |
| You want access decided by warehouse grants alone | Warehouse-native views | The same privileges cover the table and the metric |
| Both teams already have definitions | Both, with one owner per metric | Sync from the owner so the numbers match |

## Can you run both without two versions of revenue?

Yes, if each metric has one source of truth. Pick the owner for each metric (often dbt for metrics the analytics team built, and the warehouse for metrics a platform team publishes to Cortex or Genie), then generate the other copy from it. Hand-maintained copies drift apart, and an agent that finds two revenue metrics will pick one without telling you which.

An open format helps here. The Open Semantic Interchange specification (OSI, now Apache Ossie) gives metrics a shared shape that several vendors read, and dbt documents an osi-paths setting that reads Ossie documents from a folder in your project. Keeping the definition portable means you can change engines later without rebuilding every metric.

## How Rig does it

Rig Map holds the metric map across your engines. Certified metrics are stored in an OSI-compatible format with their SQL, description and certification status, and Rig can import an existing LookML layer, sync with Omni, open pull requests to your Git repo and read dbt schema files where metrics are defined. Rig Map also keeps the wider context around those metrics: tables, joins, business terms and sample values. Teams keep their dbt project and its metrics where they are.

Gateway decides who and which agents can query those metrics. Each agent gets its own role copied from one you trust, its own token and a daily call cap, and every call lands in the audit log under the agent's name. Column masks, row filters and PII policies apply to people and agents alike, whether they ask from Claude, Cursor or a Rig data app. Cleo's data team certifies metrics and table descriptions on its own Redshift in Rig, and its staff and their agents reach them from Claude and Cursor.

## Tools and approaches

[dbt Semantic Layer](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-semantic-layer)

Metrics defined in the dbt project and served through MetricFlow. Available on dbt Starter and Enterprise-tier accounts, with JDBC, GraphQL and Python interfaces and a dbt MCP server for AI tools.

[Snowflake semantic views](https://docs.snowflake.com/en/user-guide/views-semantic/overview)

Schema-level objects holding logical tables, relationships, facts, dimensions and metrics. Queried with SELECT and read by Cortex Analyst and Cortex Agents.

[Databricks metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/)

Metric definitions registered in Unity Catalog, with measures kept separate from dimensions. Queried from SQL editors, notebooks, dashboards, Genie Agents and alerts.

[Cube](https://cube.dev/product/semantic-layer)

Cube describes its semantic layer as the governed core of its AI context layer, with metrics, dimensions, joins and access rules defined once. AI agents such as Claude and ChatGPT query it as a tool through MCP.

## Common questions

Can I use dbt and Snowflake semantic views together?

Yes. Decide which one owns each metric and generate the other copy from it. Two hand-written definitions of the same metric will drift, and agents will find both.

Does the dbt Semantic Layer replace Unity Catalog metric views?

It can cover the same metrics from a different place. dbt metrics sit in your dbt project and are served by MetricFlow, while metric views sit in Unity Catalog, where Genie and Databricks dashboards read them directly.

Who owns the metric if both exist?

Whoever you name as the owner for that metric. Write it down per metric, keep the owner's copy as the source and treat every other copy as generated.

Which one should agents query?

The certified definition, through an identity that belongs to the agent. That can be dbt through MCP or a native view through SQL, as long as the agent has its own role, row limits and a log.

Can dbt enforce who is allowed to query a metric?

dbt runs queries under the warehouse credential tied to a service token, or under a user's own credential with a personal access token, so the warehouse grants on that credential decide what comes back. Per-agent roles and audit trails need an identity for each agent.

## Related reading

[Data context and governance](https://rig.so/use-cases/data-context-and-governance)[Rig Map](https://rig.so/products/rig-map)[Gateway](https://rig.so/products/gateway)[WTF is a semantic layer anyway?](https://rig.so/blog/wtf-is-a-semantic-layer)[Semantic layer](https://rig.so/compare/semantic-layer)[How far do Snowflake Semantic Views actually get you?](https://rig.so/blog/snowflake-context-layer-and-semantic-views)[I wouldn't let an agent loose on a Databricks metric view and nothing else](https://rig.so/blog/databricks-context-layer-and-metric-views)[Semantic layer](https://rig.so/guides/semantic-layer)[Cleo case study](https://rig.so/case-studies/cleo)

## Sources

Vendor documentation checked on 20 November 2026. Confirm current features and terms with the vendor.

- [dbt Semantic Layer](https://docs.getdbt.com/docs/use-dbt-semantic-layer/dbt-semantic-layer)
- [Set up the dbt Semantic Layer](https://docs.getdbt.com/docs/use-dbt-semantic-layer/setup-sl)
- [dbt Semantic Layer APIs](https://docs.getdbt.com/docs/dbt-cloud-apis/sl-api-overview)
- [Snowflake semantic views overview](https://docs.snowflake.com/en/user-guide/views-semantic/overview)
- [Databricks metric views](https://docs.databricks.com/aws/en/uc-semantics/metric-views/)
- [Cube semantic layer](https://cube.dev/product/semantic-layer)
- [dbt osi-paths configuration](https://docs.getdbt.com/reference/project-configs/osi-paths)

## About the author

[Toby Mather](https://rig.so/blog/authors/toby-mather), Co-founder and CEO, Rig. Toby co-founded Rig after seeing how hard it was for business teams and AI to work with complex internal data. He was previously co-founder and CEO of Lingumi and CPO at Novakid.

Talk to Rig

## See your stack drawn as one diagram

An architect drafts a one-page diagram of your warehouse, sources and access path, then offers a 30-minute walkthrough.

[Request an architecture diagram for your stack](https://rig.so/book-demo?offer=architecture_diagram&from=%2Fblog%2Fdbt-semantic-layer-vs-warehouse-native-semantic-views)[Book a call with an architect](https://rig.so/book-demo?offer=architect_call&from=%2Fblog%2Fdbt-semantic-layer-vs-warehouse-native-semantic-views)

---

- [This page as HTML](https://rig.so/blog/dbt-semantic-layer-vs-warehouse-native-semantic-views)
- [Site map for language models](https://rig.so/llms.txt)
- [API and agent documentation](https://rig.so/developers)
