Use MetricFlow in dbt to centrally define your metrics. As a key component of the dbt Semantic Layer, MetricFlow is responsible for SQL query construction and defining specifications for dbt semantic models and metrics.
Use familiar constructs like semantic models and metrics to avoid duplicative coding, optimize your development workflow, ensure data governance for company metrics, and guarantee consistency for data consumers.
MetricFlow is currently available on dbt v1.6 or higher and allows users to define metrics in their dbt project whether in dbt Cloud or dbt Core. dbt Core users can use the MetricFlow CLI to define metrics in their local dbt Core project. However, to experience the power of the universal dbt Semantic Layer and query those metrics in downstream tools, you'll need a dbt Cloud Team or Enterprise account.
Before you start, consider the following guidelines:
- Define metrics in YAML and query them using these new metric specifications.
- You must be on dbt v1.6 or higher to use MetricFlow. Upgrade your dbt version to get started.
- Use MetricFlow with Snowflake, BigQuery, Databricks, Postgres (CLI only), or Redshift. (dbt Cloud Postgres support coming soon)
- Unlock insights and query your metrics using the dbt Semantic Layer and its diverse range of available integrations.