databricks-metric-views

Define and manage governed business metrics in Databricks Unity Catalog using YAML.

Updated Mar 10, 2026
One-click install
npx skills add https://github.com/robkisk/coding-agents-databricks-app --skill databricks-metric-views-robkisk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-metric-views
Source: https://github.com/robkisk/coding-agents-databricks-app/tree/main/.claude/skills/databricks-metric-views
Command: npx skills add https://github.com/robkisk/coding-agents-databricks-app --skill databricks-metric-views-robkisk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the definition, creation, and management of standardized business metrics within Databricks Unity Catalog, ensuring consistent KPIs across an organization.

Core Features & Use Cases

  • Define Metrics in YAML: Create reusable metric definitions separate from their usage.
  • Support Complex Aggregations: Handle ratios, window measures (moving averages, YTD), and filtered measures.
  • Declarative Joins: Model star and snowflake schemas directly within the metric definition.
  • Use Case: A finance team needs to track monthly recurring revenue (MRR) consistently across all sales dashboards and reports. They can define MRR as a metric view, ensuring everyone uses the same calculation and source data.

Quick Start

Use the databricks-metric-views skill to create a metric view named 'catalog.schema.orders_metrics' from the source 'catalog.schema.orders' with a 'Total Revenue' measure.

Frequently Asked Questions about databricks-metric-views

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define governed business metrics in Databricks Unity Catalog using YAML?

You can define governed business metrics in Databricks Unity Catalog by creating a YAML specification that separates metric definitions from their usage, enabling consistent KPI reporting. This approach supports complex aggregations and declarative joins for star schemas.

Can I model star and snowflake schemas directly within Databricks metric definitions?

Yes, you can model star and snowflake schemas directly within Databricks metric definitions using declarative joins. This allows you to define relationships for consistent querying across complex data structures without altering the underlying source tables.

How do I handle complex aggregations like ratios and YTD window measures in Databricks metric views?

Databricks metric views support complex aggregations including ratios, filtered measures, and window measures like YTD or moving averages. You define these calculations declaratively in the YAML specification to ensure consistent execution.

What is the best way to ensure consistent KPI calculations across Databricks SQL and AI/BI Dashboards?

The best way to ensure consistent KPI calculations is to define them as governed metric views within Unity Catalog. This centralizes the logic so Databricks SQL, AI/BI Dashboards, and Genie all query the same standardized definitions.

Does defining business metrics in YAML require any separate dependencies or external tools?

No external dependencies or tools are required to define business metrics in YAML. The Skill operates independently using references to create and manage metric views natively within the Databricks Unity Catalog environment.

Why define metrics separately in YAML rather than directly in Databricks SQL queries?

Defining metrics separately in YAML ensures reusable metric definitions that prevent calculation discrepancies across reports. This governance approach centralizes KPI logic so teams always query the exact same source data and aggregations.