databricks-metric-views

Define, create, and query governed business metric views in Unity Catalog.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Organizations struggle to maintain consistent, governed business metrics across dashboards, reports, and AI tools, leading to duplicated definitions and inaccurate analysis.

Core Features & Use Cases

  • Standardized Metric Definitions: Define reusable metric views in YAML that separate measures from dimensions.
  • Cross-Team Governance: Store metric views in Unity Catalog, enabling shared access and consistent naming.
  • Flexible Querying: Query metrics with the MEASURE() function for any aggregation, including ratios and window measures. Use case: A finance team creates a revenue KPI metric view once and then uses it in dashboards, Genie queries, and alerting without rewriting SQL.

Quick Start

Create a metric view for your orders table using the databricks-metric-views skill.

Frequently Asked Questions about databricks-metric-views

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

FAQPage Schema
How do I create governed metric views in Databricks to standardize KPIs?

You create governed metric views in Databricks by defining reusable measures and dimensions in YAML syntax. This separates metric logic from data structure, enabling standardized KPIs across dashboards and AI tools via Unity Catalog.

What are Databricks metric views and how do they solve inconsistent business metrics?

Databricks metric views are governed SQL objects defined in YAML that standardize business metrics. They solve inconsistent KPI reporting by storing reusable definitions in Unity Catalog, eliminating duplicated SQL logic across teams and tools.

How do I query governed metrics with custom aggregations in Databricks SQL?

You query governed metrics in Databricks SQL using the MEASURE() function. This allows flexible aggregation of defined measures, including calculating complex ratios and window measures without rewriting underlying SQL code.

Does the Databricks metric views YAML syntax require a specific runtime version?

Yes, the Databricks metric views YAML syntax requires Databricks Runtime 17.2 or higher. You also need active SQL warehouse permissions to properly create, manage, and query the metric views stored in Unity Catalog.

Can I use a single revenue metric view across multiple BI dashboards and AI tools?

Yes, you can use a single revenue metric view across multiple BI dashboards and AI tools. Storing metric views in Unity Catalog enables shared cross-team access, ensuring consistent naming and logic without rewriting SQL.

Why should I use Unity Catalog metric views instead of writing raw SQL for KPIs?

You should use Unity Catalog metric views instead of raw SQL to enforce cross-team governance. This approach standardizes metric definitions in YAML, preventing duplicated logic and inaccurate analysis while allowing flexible querying.