databricks-metric-views

Define Unity Catalog metric views with YAML models and MEASURE() queries.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/itsadijmbt/SecureMCP-Servers --skill databricks-metric-views-itsadijmbt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-metric-views
Source: https://github.com/itsadijmbt/SecureMCP-Servers/tree/main/TEST_SERVERS/PORTED_TO_SECUREMCP/databrickslab-mcp/ai-dev-kit/databricks-skills/databricks-metric-views
Command: npx skills add https://github.com/itsadijmbt/SecureMCP-Servers --skill databricks-metric-views-itsadijmbt

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It streamlines the creation of consistent, governed business metrics by letting teams define how measures and dimensions are computed in one reusable YAML-backed model instead of rewriting metric logic in many dashboards and queries.

Core Features & Use Cases

  • Reusable metric definitions: Create Unity Catalog metric views that standardize KPIs (for example revenue, orders, conversion, churn) with consistent measure and dimension naming.
  • Flexible querying with MEASURE(): Query aggregated metrics safely using MEASURE() and explicit dimensions (avoids SELECT * and inconsistent aggregation).
  • Advanced modeling options: Support derived dimensions, ratio measures, filtered measures, star or snowflake joins, window measures, and optional materialization for faster performance.
  • Use cases: Build KPI layers for dashboards and SQL, model complex revenue and order analytics, and enable governed metrics across teams with shared definitions.

Quick Start

Use the manage_metric_views tool to create a Unity Catalog metric view for your source table by providing the full metric view name, source, dimensions, and measures, then query it using MEASURE() for the selected measures.

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?

You define governed business metrics in Databricks Unity Catalog by creating metric views using a YAML model that standardizes measures and dimensions. This ensures consistent KPI logic across SQL queries, dashboards, and analytics workflows.

How do I model complex KPIs with ratios and filtered measures in YAML?

You model complex KPIs with ratios and filtered measures in YAML by defining source tables, dimensions, and measures using advanced metric view options. This supports derived dimensions, filtered measures, ratio measures, and star or snowflake joins.

What is the correct way to query Databricks metric views with MEASURE()?

The correct way to query Databricks metric views with MEASURE() is to explicitly select aggregated measures and dimensions instead of using SELECT *. This ensures safe querying and prevents inconsistent aggregation across your analytics.

Do I need a specific Databricks Runtime version to use YAML metric views?

Yes, you need Databricks Runtime 17.2 or higher to use YAML v1.1 metric views. This runtime version is required to properly parse and apply the YAML metric definitions for your governed analytics.

Can I use metric views to standardize revenue and order analytics across teams?

Yes, you can use metric views to standardize revenue and order analytics across teams. By defining reusable measure and dimension naming in one YAML-backed model, you build a governed KPI layer for consistent reporting.