how-to-guides

No menu items for this category

Metrics in OpenMetadata

The Metrics entity in OpenMetadata allows users to define, track, and manage key business and operational metrics. Metrics help organizations maintain consistency, traceability, and accuracy in data-driven decision-making.

Metrics represent calculated values based on data assets and are categorized under the Governance section in OpenMetadata. Each metric can be linked to glossary terms, data assets, and other metrics, providing comprehensive visibility into data quality and usage.

PropertyDescriptionExample Value
NameUnique identifier for the metric, following camelCase naming conventions.customerRetentionRate
Display NameHuman-readable name for the metric.Customer Retention Rate
DescriptionDetailed explanation of what the metric represents.Percentage of retained users
ExpressionFormula or SQL query used to calculate the metric.COUNT(returning_customers)
GranularityTime scale for the metric, such as daily, weekly, or monthly.Daily
Metric TypeType of calculation applied to the metric (e.g., count, average, ratio).Percentage
Unit of MeasurementUnit for interpreting metric values, such as count, dollars, or percentage.Percentage
SQL QueryOptional SQL query defining the metric.SELECT COUNT(*) FROM sales
OwnerIndividual or team responsible for maintaining the metric.Data Governance Team

OpenMetadata allows users to trace the source and dependencies of metrics using lineage. This ensures end-to-end traceability from raw data to metric reporting. A typical lineage might look like:

Users can view associated tables, pipelines, and dashboards to understand how metrics are generated and utilized.

To create a new metric in OpenMetadata using the user interface, follow these steps:

  • Go to Govern > Metrics in the OpenMetadata UI.
Navigate to the Metrics Section

Navigate to the Metrics Section

  • Click on Add Metric to initiate the metric creation process.
Add a New Metric

Add a New Metric

Provide the required information, including:

  • Metric Name
  • Description
  • Granularity (time scale of the metric)
  • Metric Type (e.g., count, average, ratio)
  • Computation Code (SQL, Python, or Java) if applicable
  • After entering the details, click Create to finalize the metric.
Create the Metric

Create the Metric

  • The newly created metric will now be available in the Metrics page for reference and further use.
View the Created Metric

View the Created Metric

  • Versioning: Each update to a metric creates a new version, maintaining historical changes.
  • Linking: Metrics can be linked to glossary terms, tables, dashboards, and pipelines for enriched context.
  • Monitoring: Metrics can be monitored for value changes, enabling trend analysis over time
  • Consistent Naming: Use camelCase for metric names to ensure consistency across systems.
  • Clear Definitions: Provide comprehensive descriptions and units for accurate interpretation.
  • Lineage Tracking: Always associate metrics with source tables and pipelines for traceability.
  • Ownership: Assign metric owners for accountability and maintenance.