MetricFlow vs Cube: Which Semantic Layer is Right for Your Data Needs?
Evaluating MetricFlow and Cube for your data strategy
When comparing MetricFlow and Cube as semantic layers, start with where your metrics live and how they are served. MetricFlow is the open-source metric engine behind the dbt Semantic Layer, Apache 2.0 since v0.209.0 (October 2025) and built to run inside a dbt project. Cube is an open-source semantic layer (Cube Core, Apache 2.0) with a managed platform, Cube Cloud, that its site now calls "the agentic analytics platform built on a semantic layer" (both checked October 2026).
Key Takeaways
- •MetricFlow compiles metric requests into SQL from the semantic models and metrics in your dbt project; it requires a dbt project and a dbt adapter.
- •Cube serves governed metrics through its own APIs and an MCP server, and speeds up heavy query loads with pre-aggregations stored in Cube Store.
- •Choosing between MetricFlow and Cube depends on your specific needs, such as how deep you are in dbt and how many tools and apps query your metrics.
- •Both are open source today: MetricFlow under Apache 2.0 from v0.209.0 (October 2025), Cube Core under Apache 2.0. The hosted options are the dbt platform's Semantic Layer (Starter, Enterprise and Enterprise+ plans) and Cube Cloud.
- •Both tools offer distinct advantages, making it crucial to evaluate them based on your organization's data strategy.
MetricFlow Overview
MetricFlow was built by Transform, which dbt Labs acquired in 2023, and is now maintained by dbt Labs as part of the Open Semantic Interchange (OSI) initiative, the vendor-neutral semantic standard that entered the Apache Incubator as Apache Ossie in July 2026. Teams define semantic models and metrics in YAML inside their dbt project, and MetricFlow compiles each metric request into SQL for the warehouse. According to the dbt Semantic Layer documentation, the Semantic Layer, powered by MetricFlow, centralizes metric definitions so data teams can ensure consistent self-service.
MetricFlow is particularly suited for organizations that prioritize metric standardization across their data environments. Its ability to harmonize metrics ensures that teams can trust the data they work with, reducing discrepancies and improving analytical accuracy. This feature is especially beneficial in large organizations where multiple teams may be accessing and analyzing the same datasets.
Additionally, MetricFlow's integration with dbt allows for a streamlined workflow. Teams that already use dbt for data transformation will find MetricFlow's capabilities complementary, as it extends dbt's reach into the semantic layer. This not only simplifies the data pipeline but also enhances the governance of metrics, ensuring that all stakeholders are on the same page.
MetricFlow itself is a Python library and a command-line tool (mf), so metrics are defined, reviewed and versioned as code in pull requests. That keeps the learning curve low for dbt users and lets different teams work on shared metrics in one place. The dbt platform adds the hosted Semantic Layer APIs that BI tools, spreadsheets and AI agents query.
Cube Overview
Cube is an open-source semantic layer and analytics API platform. Cube Core is Apache 2.0 and self-hosts with Docker; Cube Cloud is the managed platform, which adds Cube's AI agents, workbooks and embedded analytics. As per the Cube documentation, the data model is exposed to downstream tools through a rich set of APIs, and pre-aggregations let Cube handle high query loads with fast responses.
Cube's strength is fast, consistent answers at high concurrency. Pre-aggregations, stored in Cube Store and refreshed on a schedule, serve complex queries quickly, and lambda pre-aggregations combine them with the newest rows when a dashboard needs current data. This makes Cube a strong choice for applications that demand high performance, such as dashboards and embedded analytics.
Moreover, Cube's open-source nature allows for extensive customization and integration flexibility. It connects to the major warehouses and databases, and its dbt integration pulls dbt models into Cube and converts them into cubes, by hand, from a CI/CD pipeline or on every push. Organizations can tailor Cube to fit their specific requirements.
Cube also enforces access control in the semantic layer itself: data access policies and row-level security apply across its APIs, so the same rules hold for dashboards, embedded apps and AI agents. Its documentation and open-source community make it easier for organizations to implement and troubleshoot any issues that arise.
Comparison Table
| Feature | MetricFlow | Cube |
|---|---|---|
| Integration with dbt | Native: metrics live in the dbt project | dbt integration imports dbt models as cubes |
| Fresh data | Queries the warehouse at request time | Pre-aggregations, plus lambda pre-aggregations for the newest rows |
| Performance optimization | Relies on the warehouse | Pre-aggregations in Cube Store |
| Metric consistency | High | High |
| Open-source | Yes, Apache 2.0 from v0.209.0 (Oct 2025) | Yes, Cube Core under Apache 2.0 |
| Approach | Metric-first | Data-model and API-first |
| Deployment | Library and CLI in your dbt project; hosted Semantic Layer on the dbt platform | Self-hosted Cube Core or managed Cube Cloud |
| Pricing/License | Free core; Semantic Layer APIs on dbt platform Starter, Enterprise and Enterprise+ | Free core; Cube Cloud is a paid service |
| AI-agent integration | dbt MCP server exposes Semantic Layer metrics | Cube MCP server and Cube's own agents |
| Security | Warehouse and dbt platform permissions | Data access policies and row-level security in the semantic layer |
Choosing the Right Semantic Layer
Selecting between MetricFlow and Cube requires evaluating your specific data needs and organizational goals. If your team heavily relies on dbt and values metrics defined next to the models, MetricFlow may be the better choice: metrics are defined and reviewed in the same project as the transformations they read. However, if many dashboards, embedded apps and agents hit your metrics at once and fast responses matter most, Cube's pre-aggregations and APIs might make it the more suitable option.
Understanding the trade-offs between MetricFlow and Cube is essential. MetricFlow simplifies the process for teams already embedded in the dbt ecosystem, reducing the learning curve and enhancing productivity. On the other hand, Cube's caching layer and access policies make it ideal for high-traffic environments where many consumers query the same governed metrics.
Data Workers, the agentic data platform, works across both. It imports your MetricFlow semantic models and metrics into the Data Context Wizard graph, routes conflicting definitions of the same metric to an owner for review, and checks the columns each metric reads on Snowflake, Postgres or BigQuery (nulls, key uniqueness, row counts) along with the baselines your team records. Data Workers connects to Cube over its API or MCP server today. See our field guides for the dbt Semantic Layer and Cube, and the Atlan alternatives comparison for the catalog side.
Additionally, consider the long-term scalability of each solution. MetricFlow's metrics-as-code approach may provide a stable foundation for growing data needs, while Cube's caching and API layer offer the headroom required as the number of consumers grows. Assessing your organization's future data strategy will help determine which tool aligns best with your evolving requirements.
Frequently Asked Questions
What are the main differences between MetricFlow and Cube? MetricFlow defines metrics in your dbt project and compiles them to SQL, while Cube is a standalone semantic layer with its own APIs, pre-aggregation caching and, in Cube Cloud, AI agents.
Is Cube suitable for real-time analytics? Cube serves low-latency queries from pre-aggregations, and lambda pre-aggregations add the newest rows for dashboards that need current data.
Can MetricFlow be used without dbt? No. Its README says MetricFlow is built to work with a dbt project and requires a working dbt project and a dbt adapter (the dbt-metricflow bundle). You can run it with open-source dbt and the mf CLI, without the dbt platform.
How do MetricFlow and Cube handle security? MetricFlow relies on the warehouse and dbt platform permissions of whoever runs it, while Cube enforces data access policies, including row-level security, in the semantic layer itself.
Which tool is more cost-effective for my organization? Both cores are free under Apache 2.0. Self-hosting MetricFlow means running it with open-source dbt; the hosted Semantic Layer APIs come with dbt platform Starter, Enterprise and Enterprise+ plans. Self-hosting Cube Core takes in-house engineering to run the API and Cube Store, and Cube Cloud is the managed, paid option.