# MetricFlow

> Metrics engine behind the dbt Semantic Layer that compiles ratio, cumulative, and derived metrics defined in a dbt project into SQL. Apache 2.0; the APIs and BI integrations are part of the paid dbt platform.

Source: https://toolsfordata.com/tools/metricflow/ · Updated 2026-12-02

[Website](https://docs.getdbt.com/docs/build/about-metricflow) · [Docs](https://docs.getdbt.com/docs/build/about-metricflow) · [GitHub](https://github.com/dbt-labs/metricflow) (1.9k stars)

Best for: dbt projects that want tested metric definitions in Git and can query them from the command line, without BI tools connected.

## Overview

- Core Strength: Open-source metrics engine inside dbt
- Best For: dbt projects that query metrics from the command line
- Deployment Model: Self-hosted with the dbt project
- Pricing: Free (Apache 2.0)
- Notable Caveat: APIs and BI integrations need the paid dbt platform
- Modeling: Partial — derived metrics, multi-fact, as code
- Portability: Partial — import, Apache Ossie
- Query Interfaces: Not supported
- BI & Spreadsheets: Not supported
- AI Agents: Partial — AI modeling
- Performance: Not supported
- Governance: Partial — validation
- Security & Access: Not confirmed

## What it's used for

MetricFlow is used to define metrics in a dbt project and compile them into SQL, so metric logic is tested and reviewed in Git like the models.

## Semantic models

Semantic models and metrics are YAML in the dbt project. Joins go through entities, across several hops, and ratio, derived and cumulative metrics build on other metrics. Dimensions have no drill hierarchies.

## Portability

dbt v1.12 reads Apache Ossie JSON documents as semantic models and metrics. Exporting to other formats is not in the MetricFlow docs.

## Workflows

Metrics are queried from the command line. JDBC and GraphQL APIs, BI tools and spreadsheets need the paid dbt Semantic Layer. It runs on Snowflake, BigQuery, Databricks, Redshift and Postgres.

## AI

dbt's agent skills teach coding agents to write semantic models and metrics. The MCP server's metric tools call the paid Semantic Layer API.

## DataOps

Parsing, semantic and warehouse validations run from the command line, so CI can block a broken metric.

## Governance

No access rules of its own: what a query can read follows the warehouse login.

## Deployment

MetricFlow runs wherever the dbt project runs, as a command line tool and Python library.

## Pricing

MetricFlow is free under Apache 2.0. Serving its metrics to BI tools and agents needs the dbt Semantic Layer, from $100 per user per month on dbt Starter.

## Review

Strengths:
- Free, Apache 2.0, maintained by dbt Labs.
- Metric definitions tested in the same CI as dbt models.
- Reads Apache Ossie documents.

Caveats:
- No API, BI or spreadsheet access without the paid dbt platform.
- No caching, hierarchies or access rules.

Recommendation: Use MetricFlow to keep tested metric definitions in a dbt project. Choose the dbt Semantic Layer when BI tools need them, or Cube Core for a free engine with its own APIs.

## Pricing

- Model: per user, usage-based
- Free self-hosted edition: MetricFlow (Apache 2.0)
- Entry team price: $100/user/month (Starter, 5,000 queried metrics/month)
- Entry enterprise price: Custom
- Source: https://www.getdbt.com/pricing (checked 2026-12-02)

## Features

### Semantic Models

- Metrics & Dimensions: Yes — Semantic models and metrics are defined in YAML. ([source](https://docs.getdbt.com/docs/build/build-metrics-intro))
- Joins & Relationships: Yes — Multi-hop joins through entities. ([source](https://docs.getdbt.com/docs/build/join-logic))
- Calculated & Derived Metrics: Yes — Ratio, derived and cumulative metrics. ([source](https://docs.getdbt.com/docs/build/derived))
- Hierarchies: No — Dimensions have no drill hierarchy. ([source](https://docs.getdbt.com/docs/build/dimensions))
- Multi-Fact Models: Yes — Metrics from different semantic models can be combined. ([source](https://docs.getdbt.com/docs/build/derived))
- Definitions as Code: Yes — YAML in the dbt project's repository. ([source](https://docs.getdbt.com/docs/build/about-metricflow))

### Portability

- Model Import: Yes — dbt v1.12 reads Apache Ossie documents. ([source](https://docs.getdbt.com/docs/build/ossie-semantic-models))
- Model Export: No — Not in the MetricFlow documentation. ([source](https://docs.getdbt.com/docs/build/about-metricflow))
- Apache Ossie Support: Yes — dbt v1.12 parses Ossie JSON documents. ([source](https://docs.getdbt.com/docs/build/ossie-semantic-models))

### Workflows

- SQL API: No — The JDBC API needs the paid dbt platform; MetricFlow queries run from the command line. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- REST / GraphQL API: No — The GraphQL API needs the paid dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- MDX / DAX API: No — Metrics are queried from the command line. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- BI Tool Integrations: No — BI integrations need the paid dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Spreadsheet Integration: No — Google Sheets and Excel connect through the paid dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Embedded Analytics: No — Queried from the command line. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Multi-Warehouse Support: Yes — Snowflake, BigQuery, Databricks, Redshift, and Postgres (dbt v1 only). ([source](https://docs.getdbt.com/docs/build/about-metricflow))
- dbt Integration: Yes — Runs inside a dbt project. ([source](https://docs.getdbt.com/docs/build/about-metricflow))
- Data Catalog Integration: No — Not in the MetricFlow documentation. ([source](https://docs.getdbt.com/docs/build/about-metricflow))

### AI & Agents

- MCP Server: No — The self-hosted dbt MCP server's semantic layer tools use the paid Semantic Layer API. ([source](https://docs.getdbt.com/docs/dbt-ai/mcp-available-tools))
- Natural Language Query: No — The engine compiles metrics; questions are asked through dbt Wizard, a separate dbt product. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- AI-Assisted Modeling: Yes — dbt's agent skills teach coding agents to create semantic models and metrics. ([source](https://github.com/dbt-labs/dbt-agent-skills))
- AI Metadata & Synonyms: No — Metrics take descriptions and meta; synonyms or fields written for agents are not in the documentation. ([source](https://docs.getdbt.com/docs/build/metrics-overview))
- Verified Queries: No — A metrics engine and command line tool. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- AI Memory: No — A metrics engine and command line tool. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Agent Evaluation: No — A metrics engine and command line tool. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))

### Query Optimizations

- Pre-Aggregations: No — Declarative caching is for Enterprise plans of the dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-cache))
- Query Caching: No — Relies on the data platform's own cache; the dbt platform's caching is for Enterprise plans. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-cache))

### DataOps

- Model Testing & Validation: Yes — Parsing, semantic and data platform validations from the command line. ([source](https://docs.getdbt.com/docs/build/validation))
- Orchestration Integration: No — Not in the MetricFlow documentation. ([source](https://docs.getdbt.com/docs/build/about-metricflow))
- Observability & Monitoring: No — Not in the MetricFlow documentation. ([source](https://docs.getdbt.com/docs/build/about-metricflow))

### Data Governance

- Row & Column-Level Security: No — Not in the MetricFlow documentation; access follows the warehouse login. ([source](https://docs.getdbt.com/docs/build/about-metricflow))
- Data Lineage: Unknown — Not described in the docs checked. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))

### Security

- SSO: No — Accounts belong to the dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- RBAC: No — Roles belong to the dbt platform. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Audit Log: No — The audit log is for Enterprise plans of the dbt platform. ([source](https://docs.getdbt.com/docs/platform/manage-access/audit-log))
- Compliance Certifications: Unknown — You run it, so this depends on your environment. ([source](https://github.com/dbt-labs/metricflow))
- SCIM Provisioning: No — SCIM is for Enterprise plans of the dbt platform. ([source](https://docs.getdbt.com/docs/platform/manage-access/scim))
- Private Networking: Unknown — You run it inside your own network, so this depends on your setup. ([source](https://github.com/dbt-labs/metricflow))

### Deployment

- Multi-Environment Support: Unknown — Not described in the docs checked. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- SaaS Deployment: No — The hosted service is the dbt Semantic Layer. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Self-Hosted Deployment: Yes — Runs wherever the dbt project runs. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Cloud-Native App: No — A command line tool and library. ([source](https://docs.getdbt.com/docs/use-dbt-semantic-layer/sl-architecture))
- Open Source: Yes — Apache 2.0 license. ([source](https://github.com/dbt-labs/metricflow))

## Integrations

7 integrations, each sourced from the vendor docs.

- Data Platform: Databricks
- Data Transformation: dbt
- Data Warehouse: Snowflake, Google BigQuery, Amazon Redshift
- Databases: PostgreSQL
- Semantic Layer: Apache Ossie

## Alternatives

- [dbt Semantic Layer](https://toolsfordata.com/tools/dbt-semantic-layer/): Consider the dbt Semantic Layer to serve the same MetricFlow definitions to BI tools, spreadsheets and agents through JDBC, GraphQL and MCP.
- [Cube Core](https://toolsfordata.com/tools/cube-core/): Consider Cube Core for a free engine you host with SQL, REST and GraphQL APIs and pre-aggregations; it can load dbt models.
- [Wren AI OSS](https://toolsfordata.com/tools/wren-ai-oss/): Consider Wren AI OSS if coding agents are the main consumers, with an open-source model they read through MCP.
- [Malloy](https://www.malloydata.dev): Consider Malloy for an open-source modeling and query language over SQL, served through REST and MCP by Publisher, outside a dbt project.
- [Boring Semantic Layer](https://boringdata.github.io/boring-semantic-layer/): Consider Boring Semantic Layer for metrics defined in Python on Ibis, without a dbt project.
- [Snowflake Semantic Views](https://toolsfordata.com/tools/snowflake-semantic-views/): The paid option inside the warehouse: metrics as Snowflake objects, queried with SQL or Cortex Agents.
