Unwind DataUnwind Data
Semantic Layer

dbt Semantic Layer vs Cube: Which Architecture Actually Fits Your Stack

dbt Semantic Layer and Cube are not interchangeable. One defines metrics. The other defines and serves them. This is the architectural difference that determines which one belongs in your stack.

Talk to an expert

The dbt semantic layer vs Cube debate is the most common architecture question I hear from data teams right now. Both are open source. Both sit between your warehouse and your consumers. Both let you define metrics once and use them everywhere.

So which one do you choose?

Most comparisons answer this with a feature table. That is not how the decision actually works. The dbt Semantic Layer, powered by MetricFlow, and Cube are not competing for the same job. They solve the problem from different architectural positions, and picking the wrong one means rebuilding in 18 months.

I have implemented both. Here is the distinction that most comparisons skip.

The architectural gap nobody explains clearly

The dbt Semantic Layer is a definition layer. It lets you describe metrics, dimensions, and entities in YAML files that live inside your dbt project, version-controlled alongside your transformations. When someone queries a metric, the request goes through dbt Cloud's Semantic Layer API, which translates it into SQL and fires it against your warehouse. That is the complete picture.

Cube is a definition-and-serving layer. It also describes metrics in YAML (or JavaScript). But Cube runs as a standalone server, sitting between your consumers and your warehouse. It pre-aggregates frequently queried combinations into its own columnar store (CubeStore), caches results, exposes REST, GraphQL, SQL, MDX, and DAX APIs, and handles multi-tenancy and row-level security natively.

The practical difference: the dbt Semantic Layer defines your metrics and lets the warehouse do all the serving. Cube defines your metrics and takes over the serving layer itself.

This one architectural distinction drives almost every trade-off that follows.

What the dbt Semantic Layer actually does well

If your data team already runs dbt, the Semantic Layer is the lowest-friction path to governed metrics. Metric definitions live in the same Git repository as your transformations. The same CI/CD pipeline, the same pull request workflow, the same dbt build command. You are not introducing a new tool, a new server, or a new deployment surface.

The governance model is strong. When a metric definition changes, it goes through version control. You can see exactly what changed, who approved it, and what downstream queries will be affected before anything goes to production. For data teams that have fought hard for engineering discipline in their analytics workflows, this feels like the natural extension. For a deeper look at how MetricFlow works in practice, see our guide to the dbt Semantic Layer and MetricFlow.

The ecosystem is growing. The dbt Semantic Layer API integrates directly with Looker, Hex, Mode, Tableau (via connector), and others. For most internal BI use cases, that coverage is sufficient.

There are two constraints worth stating plainly. First, the Semantic Layer API requires dbt Cloud. Teams running dbt Core cannot access it. This is not a minor footnote: it means the feature has a meaningful cost floor that does not exist with Cube. Second, there is no caching or pre-aggregation. Every query hits your warehouse directly. For dashboards with dozens of users, this is fine. For high-concurrency use cases or customer-facing analytics products, it becomes a cost and latency problem quickly.

What Cube actually does well

Cube's strength is in what happens after metric definition. The serving layer is the differentiator.

Diagram showing dbt Semantic Layer vs Cube architecture: definition layer versus definition-and-serving layer

Pre-aggregations are the clearest example. Cube pre-computes frequently queried metric combinations and stores them in CubeStore, its columnar storage engine. A query that normally hits your Snowflake warehouse and costs compute cycles instead returns from cache in milliseconds. For embedded analytics products, customer-facing dashboards, or any situation where query volume and latency matter, this capability changes the economics entirely.

The API surface is broader. Cube exposes REST, GraphQL, SQL, MDX, and DAX APIs simultaneously. Any consumer, from a BI tool to a custom application to an AI agent, can query your governed metrics through the protocol it prefers. The dbt Semantic Layer offers JDBC and GraphQL. Cube offers those plus everything else.

Multi-tenancy is a first-class concern in Cube. You can isolate metric access per customer, per tenant, or per user group through Cube's security contexts. This is the architecture that powers embedded analytics products: one Cube deployment serves multiple end-customers with isolated data access. The dbt Semantic Layer does not have an equivalent.

The trade-off is operational. Cube is a running server. You deploy it, maintain it, monitor it, and scale it. That is infrastructure overhead that the dbt Semantic Layer eliminates by routing through a managed API. For small teams or organizations without platform engineering resources, that overhead is real.

The decision that actually matters: what is consuming your metrics

The most useful way to choose between these tools is not to compare features. It is to look at who and what will be querying your semantic layer.

Use caseBetter fitWhy
Internal BI dashboards on a dbt-first teamdbt Semantic LayerZero new infrastructure. Metrics live with transformations. Native workflow.
Embedded analytics for external customersCubeMulti-tenancy, caching, and per-customer access control are built-in.
High-concurrency dashboards or customer-facing productsCubePre-aggregations eliminate warehouse costs at scale. dbt SL has no caching.
dbt Core users (not dbt Cloud)Cubedbt SL API requires dbt Cloud. Cube is fully open source and self-hostable.
Teams that want metrics-as-code in Gitdbt Semantic LayerYAML definitions colocated with dbt models in version control.
Custom applications querying governed metrics via REST or GraphQLCubeBroader API surface; no dbt Cloud dependency for application queries.
Enterprise with AI agents querying business metricsBoth (see below)Both support MCP; Cube's API surface gives it an edge today.

The AI agent question

This is where the comparison gets interesting for 2026 deployments. AI agents need governed data. An agent querying your warehouse without a semantic layer picks whichever definition of "revenue" it finds first. It does not know whether that definition accounts for refunds, FX conversions, or the Q4 accrual adjustment your finance team made three years ago. The semantic layer is the component that prevents this.

Both tools are moving toward AI readiness. The dbt Semantic Layer exposes metrics through JDBC and GraphQL APIs that LLM applications can query. Cube goes further: it provides a dedicated AI API endpoint and a semantic model agent that serves the full data model in a format LLMs can reason over. Cube also supports Model Context Protocol (MCP) integration, allowing AI agents to query governed metrics through the same protocol that tools like Claude use to interact with data systems. For more on MCP and the semantic layer, see why MCP without a semantic layer will fail.

In practice today, Cube has a broader API surface for AI consumers. But dbt Labs is moving fast. The OSI specification, which both tools have committed to, is the longer-term equalizer here.

OSI: why this choice is less permanent than it looks

The Open Semantic Interchange specification, released in January 2026, is the most important development in this comparison that nobody is talking about yet.

OSI is a vendor-neutral, YAML-based standard for representing semantic metadata. Snowflake, dbt Labs, Cube, AtScale, Databricks, and over 40 other partners have committed to supporting it. The practical implication: metric definitions you write today in dbt's YAML format could theoretically be consumed by Cube tomorrow, or by Snowflake's Semantic Views, without rewriting anything. We covered the full OSI ecosystem in detail in our guide to Open Semantic Interchange participants.

This does not mean the tools are interchangeable. The serving architecture, the caching, the multi-tenancy, the API surface, the operational model: none of that transfers. But it does mean the business logic you encode in either tool is increasingly portable. The lock-in risk, which has historically made this decision feel permanent, is shrinking.

The hidden constraint: dbt Cloud pricing

One thing every comparison glosses over: the dbt Semantic Layer API is a dbt Cloud feature. Teams running dbt Core, the open-source version, cannot access it.

This matters because many data teams use dbt Core in production, either for cost reasons or because they run fully self-hosted infrastructure. If that describes your organization, the dbt Semantic Layer is not actually on the table unless you are willing to move to dbt Cloud. Cube's open-source version has no such constraint. You can run the full Cube semantic layer, including the serving layer and APIs, entirely on your own infrastructure.

The flip side: if you are already paying for dbt Cloud, the Semantic Layer is included in Team and Enterprise plans. In that context, the incremental cost is zero, which makes it a very easy first step toward governed metrics.

When neither is the right answer

There is a third scenario that neither tool handles well: organizations that are Snowflake-native and want their semantic layer to be a first-class warehouse object rather than external middleware.

Snowflake's Semantic View Autopilot, launched in early 2026, defines semantic views directly as Snowflake objects in the catalog. No external server. No middleware latency. No separate deployment. For organizations that have committed to Snowflake as their primary data platform, this architecture eliminates the operational overhead of both dbt SL (dbt Cloud dependency) and Cube (server management) while delivering governed metric definitions that sit alongside tables and views in the warehouse itself.

The trade-off is portability. Snowflake Semantic Views are Snowflake-native. They do not travel to other warehouses. If your data architecture is deliberately multi-cloud or if you want your semantic layer to remain independent of any single warehouse vendor, this is not the right path. But for Snowflake-first organizations, it is worth evaluating before defaulting to either option.

The practical recommendation

Based on direct implementation experience across all three approaches, here is how I frame the decision for clients.

Choose the dbt Semantic Layer if your team runs dbt Cloud, your primary consumers are internal BI tools, you value keeping metric definitions in the same Git workflow as your transformations, and you do not need pre-aggregation or multi-tenancy. The governance model is excellent and the operational overhead is minimal.

Choose Cube if you need embedded analytics, you are building a data product for external customers, query volume or latency is a concern, you run dbt Core and want to avoid dbt Cloud costs, or you need the broadest possible API surface for diverse consumers including AI agents and custom applications.

The mistake I see most often is choosing based on feature lists rather than consumption patterns. A team that builds a Cube deployment for internal dashboards with 20 users is paying operational overhead they do not need. A team that chooses the dbt Semantic Layer for a customer-facing analytics product will hit the caching and multi-tenancy wall within months.

Start at the bottom. Ask who and what is consuming your metrics. Then pick the architecture that serves those consumers without adding complexity you will not use.

How this fits the data infrastructure stack

The semantic layer is Layer 2 in the data architecture stack: the component that translates raw data into governed business logic before it reaches any consumer, human or machine. Whether you choose the dbt Semantic Layer, Cube, or Snowflake Semantic Views, the goal is the same. One definition of revenue. One definition of churn. One source of truth for every dashboard, every report, and every AI agent that touches your data. For a full breakdown of what a semantic layer actually is and how it fits your stack, see our complete semantic layer guide.

Companies with mature data governance see 24% higher revenue from AI initiatives. That number comes from the semantic layer being in place before the AI agents arrive, not after. The tool choice matters less than whether the layer exists at all.

For every dollar companies spend on AI, six should go to the data architecture underneath it. The dbt SL vs Cube decision is a Layer 2 question. Most organizations are still asking Layer 4 questions first. Start at one, not at four.

Unwind Data

Speak with a data expert

We've helped scale-ups and enterprises move faster on exactly this kind of work — without the trial and error. Strategy, architecture, and hands-on delivery.

Schedule a consultation