metricflow 0.211.0


pip install metricflow

  Latest version

Released: May 11, 2026


Meta
Author: dbt Labs
Requires Python: <3.15,>=3.10

Classifiers

Development Status
  • 4 - Beta

Programming Language
  • Python
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

metricflow logo

Build and maintain all of your metric logic in code.


Welcome to MetricFlow

See our latest updates in the Metricflow Changelog!

MetricFlow is a semantic layer that simplifies defining and managing metrics. It compiles these metric definitions into clear, reusable SQL, ensuring consistent and accurate results when analyzing data by relevant attributes (dimensions).

The name “MetricFlow” reflects its approach: metric requests are compiled into a dataflow-based query plan, which is then optimized and translated into engine-specific SQL.



MetricFlow provides a set of abstractions that help you construct complicated logic and dynamically generate queries to handle:

  • Multi-hop joins between fact and dimension sources
  • Complex metric types such as ratio, expression, and cumulative
  • Metric aggregation to different time granularities
  • And so much more

To get up and running with your own metrics, you should rely on MetricFlow’s documentation.

Licensing

MetricFlow is distributed under the Apache 2.0 license. For details, please refer to our licensing agreement.

Open Semantic Interchange (OSI) Initiative

MetricFlow is developed and maintained as part of the Open Semantic Interchange (OSI) initiative. The OSI initiative is a collaborative effort among leading technology companies and data practitioners to establish a open standard for defining and exchanging semantic information, enabling AI/BI interoperability across different platforms and tools.

Getting Started

Install MetricFlow

MetricFlow can be installed from PyPi for use as a Python library with the following command:

pip install dbt-metricflow

MetricFlow currently serves as a query compilation and SQL rendering library, built to work in conjunction with a dbt project. As such, using MetricFlow requires a working dbt project and a dbt adapter. We provide the dbt-metricflow bundle for this purpose. You may choose to install other adapters as optional extras from dbt-metricflow.

You may need to install Postgres or Graphviz. You can do so by following the install instructions for Postgres or Graphviz. Mac users may prefer to use brew: brew install postgresql or brew install graphviz.

Tutorial

The best way to get started is to follow the tutorial steps, which you can access by running:

mf tutorial

Note: this must be run from a dbt project root directory.

Resources

Contributing and Code of Conduct

This project will be a place where people can easily contribute high-quality updates in a supportive environment.

Please read our code of conduct before diving in.

To get started on direct contributions, head on over to our contributor guide.

License History

MetricFlow is source-available software.

Version 0 to 0.140.0 was covered by the Affero GPL license. Version 0.150.0 to 0.208.2 was covered by the BSL license. Version 0.209.0 and greater is covered by the Apache 2.0 license.

MetricFlow is built by dbt Labs.

0.211.0 May 11, 2026
0.210.0 Apr 24, 2026
0.209.0 Oct 14, 2025
0.208.1 Sep 18, 2025
0.208.0 Sep 11, 2025
0.207.3 Apr 01, 2025
0.207.2 Feb 23, 2025
0.207.1 Jan 25, 2025
0.207.0 Jan 16, 2025
0.207.0.dev2 Jul 09, 2024
0.207.0.dev1 Jun 21, 2024
0.206.0 Jun 11, 2024
0.206.0.dev3 Jun 04, 2024
0.206.0.dev2 Apr 04, 2024
0.206.0.dev1 Apr 02, 2024
0.205.0 Mar 01, 2024
0.205.0.dev0 Mar 19, 2024
0.204.1.dev6 Feb 29, 2024
0.204.1.dev5 Feb 22, 2024
0.204.1.dev4 Feb 02, 2024
0.204.1.dev3 Jan 30, 2024
0.204.1.dev2 Jan 25, 2024
0.204.1.dev1 Jan 23, 2024
0.204.1.dev0 Jan 22, 2024
0.204.0 Jan 13, 2024
0.204.0.dev7 Jan 05, 2024
0.204.0.dev6 Jan 04, 2024
0.204.0.dev5 Dec 21, 2023
0.204.0.dev4 Dec 11, 2023
0.204.0.dev3 Dec 08, 2023
0.204.0.dev2 Dec 06, 2023
0.204.0.dev1 Dec 01, 2023
0.204.0.dev0 Nov 27, 2023
0.203.1 Nov 15, 2023
0.203.0 Nov 14, 2023
0.203.0.dev8 Oct 25, 2023
0.203.0.dev7 Oct 17, 2023
0.203.0.dev6 Oct 17, 2023
0.203.0.dev5 Oct 17, 2023
0.203.0.dev4 Oct 12, 2023
0.203.0.dev3 Oct 11, 2023
0.203.0.dev2 Oct 09, 2023
0.203.0.dev1 Sep 27, 2023
0.203.0.dev0 Sep 25, 2023
0.202.0 Sep 06, 2023
0.202.0.dev3 Sep 06, 2023
0.202.0.dev2 Aug 29, 2023
0.202.0.dev1 Aug 29, 2023
0.202.0.dev0 Aug 25, 2023
0.201.0 Aug 18, 2023
0.200.0 Aug 03, 2023
0.200.0rc1 Aug 02, 2023
0.200.0.dev15 Jul 31, 2023
0.200.0.dev14 Jul 28, 2023
0.200.0.dev13 Jul 17, 2023
0.200.0.dev12 Jul 12, 2023
0.200.0.dev11 Jul 10, 2023
0.200.0.dev10 Jun 29, 2023
0.200.0.dev9 Jun 28, 2023
0.200.0.dev8 Jun 27, 2023
0.200.0.dev7 Jun 27, 2023
0.200.0.dev6 Jun 26, 2023
0.200.0.dev5 Jun 23, 2023
0.200.0.dev4 Jun 08, 2023
0.200.0.dev3 Jun 07, 2023
0.200.0.dev2 May 30, 2023
0.200.0.dev1 May 24, 2023
0.200.0.dev0 May 20, 2023
0.140.0 Jan 26, 2023
0.130.1 Oct 19, 2022
0.130.0 Oct 18, 2022
0.120.0 Oct 13, 2022
0.111.1 Aug 30, 2022
0.111.0 Aug 11, 2022
0.110.1 Jul 25, 2022
0.110.0 Jul 22, 2022
0.100.2 Jun 24, 2022
0.100.1 Jun 23, 2022
0.100.0 Jun 23, 2022
0.93.0 Apr 27, 2022
0.92.1 Apr 14, 2022
0.92 Apr 13, 2022
0.91.9 Apr 06, 2022
0.91.8 Apr 06, 2022
0.91.7 Apr 06, 2022
0.91.6 Apr 05, 2022
0.91.5 Apr 05, 2022
0.91.4 Apr 05, 2022
0.91.3 Apr 05, 2022
0.91.2 Apr 05, 2022
0.91.1 Apr 05, 2022
0.91 Apr 05, 2022
0.9.999 Apr 05, 2022
0.9.99 Apr 05, 2022

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
importlib-metadata (>=4.0)
jinja2 (<3.7,>=3.1.6)
jsonschema (<5.0,>=4.17)
more-itertools (<11.0,>=10.0.0)
pydantic (<3.0,>=1.10.0)
python-dateutil (<2.10,>=2.9.0)
pyyaml (<7.0,>=6.0)
rapidfuzz (<4.0,>=3.0)
referencing (>=0.28)
sqlglot (>=20.0.0)
tabulate (>=0.8.9)
typing-extensions (<5.0,>=4.4)