When two teams in the same organization calculate "customer churn" differently and present conflicting numbers in the same board meeting, the problem is not data quality. It is the absence of a Metric Store, a centralized, version-controlled repository that defines every business KPI exactly once, in a form that every analytical consumer (BI dashboards, data science notebooks, and AI agents) must use.

The Metric Store is the logical evolution of the semantic layer concept applied specifically to quantitative metrics. Rather than encoding business logic inside BI tool configurations that are hard to audit, hard to version, and invisible to AI systems, the Metric Store treats metric definitions as code: written in YAML, stored in Git, tested in CI/CD pipelines, and served through an open API.

MetricFlow: The Leading Open Implementation

MetricFlow, which powers dbt's semantic layer, is the most widely adopted open-source metric store implementation. A MetricFlow metric definition specifies the metric name, the type (simple, ratio, cumulative, or derived), the measure it aggregates (sum, count distinct, average), the source model it reads from, the dimensions it can be filtered and grouped by, and the time granularities it supports. A ratio metric for "conversion rate" would define the numerator (count of conversions) and denominator (count of visitors) separately, ensuring that the ratio is always computed correctly regardless of which time window the query requests.

These definitions are stored as YAML files alongside dbt transformation models. When an analyst runs a MetricFlow query specifying the metric name, dimensions, and time period, MetricFlow generates the correct SQL against the underlying Iceberg tables automatically. No analyst writes the aggregation SQL by hand.

Metric Consistency Across AI Agents

When an AI agent queries the metric store API rather than deriving metrics from raw tables, its answers are automatically consistent with the numbers the organization's dashboards show. If the CFO's Tableau dashboard and the AI agent's response for "Q3 net revenue" both originate from the same MetricFlow definition, they will agree by construction. This consistency is why a metric store is not optional infrastructure for organizations deploying AI analytics; it is the mechanism that makes AI-generated numbers trustworthy.

Versioning Matters

Metric definitions change. A company that changes how it counts "active users" in April needs a clear record that the pre-April and post-April numbers are not comparable, and a way to reprocess historical data under the new definition if needed. Git's commit history gives the metric store this audit capability: every change to a metric definition is recorded with a timestamp and an author, and the previous version remains queryable for historical comparisons.

Master the Agentic Lakehouse

Start building today with free trials and authoritative resources.

Architecting an Apache Iceberg Lakehouse

Architecting an Apache Iceberg Lakehouse

Buy on Manning
The AI Lakehouse

The AI Lakehouse

Buy on Amazon
Apache Iceberg and Agentic AI

Apache Iceberg and Agentic AI

Buy on Amazon
Lakehouse Built for Everyone

Lakehouse Built for Everyone

Buy on Amazon