databricks-metric-views

Manage Unity Catalog metric views via declarative YAML specifications.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LaurentPRAT-DB/LPT_claude_config --skill databricks-metric-views-laurentprat-db
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-metric-views
Source: https://github.com/LaurentPRAT-DB/LPT_claude_config/tree/main/skills/databricks-metric-views
Command: npx skills add https://github.com/LaurentPRAT-DB/LPT_claude_config --skill databricks-metric-views-laurentprat-db

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables the definition, creation, querying, and management of standardized, governed business metrics within Databricks Unity Catalog, ensuring consistency and reusability across analytics initiatives.

Core Features & Use Cases

  • Metric Definition: Define reusable KPIs, revenue metrics, and analytics using YAML, separating measure definitions from dimension groupings.
  • Complex Aggregations: Supports ratios, filtered measures, and window measures (moving averages, running totals).
  • Schema Modeling: Enables declarative definition of star and snowflake schemas with joins.
  • Use Case: Standardize the definition of "Monthly Recurring Revenue" across your organization, ensuring all dashboards and reports use the exact same calculation, and enable easy querying of this metric alongside dimensions like "Product Category" and "Region".

Quick Start

Use the manage_metric_views tool to create a new metric view named 'catalog.schema.orders_metrics' from the source table 'catalog.schema.orders'.

Frequently Asked Questions about databricks-metric-views

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

FAQPage Schema
How do I standardize business metrics in Databricks Unity Catalog?

You standardize business metrics in Databricks Unity Catalog by defining reusable KPIs and aggregations using a declarative YAML specification. This approach separates measure definitions from dimension groupings, ensuring consistent calculations across dashboards and BI tools.

What is a Unity Catalog metric view and when do I need one?

A Unity Catalog metric view is a governed, reusable object that defines business metrics like revenue or KPIs. You need one when inconsistent metric definitions across analytics initiatives cause reporting discrepancies.

How do I create a metric view from a source table using YAML?

You create a metric view by using the management tool to specify a target name like 'catalog.schema.orders_metrics' and mapping it to a source table. The declarative YAML specification defines the measures, dimensions, and joins.

Can I define complex aggregations and window measures like running totals?

Yes, the declarative YAML specification supports complex aggregations including ratios, filtered measures, and window measures such as moving averages and running totals for advanced analytics.

Does this approach support star and snowflake schema modeling with joins?

Yes, the metric view definition supports declarative modeling of star and snowflake schemas through joins, allowing you to query metrics alongside dimensions like Product Category and Region.

What's the best way to govern KPI definitions for natural language querying?

The best way to govern KPI definitions for natural language querying is to version-control metric views in Unity Catalog. This provides a single source of truth ensuring data consistency across BI tools.