databricks-metric-views

Automate governed business metric views in Databricks using YAML definitions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill simplifies the creation and management of governed business metrics in Databricks environments, streamlining the process of defining, querying, and maintaining consistent, reusable metrics.

Core Features & Use Cases

  • YAML-Based Metric Definitions: Define and maintain metric definitions in YAML, allowing for version control and collaboration.
  • Databricks Compatibility: Seamlessly integrates with Databricks platforms, supporting metric materialization and AI/BI Genie integration.
  • Use Case: Build a standardized KPI set across different dashboards, enabling efficient analysis and reporting for revenue, order analytics, and other business metrics.

Quick Start

Define a new metric view using the YAML file 'metric-view.yaml' and apply it to the 'sales' table with the following command: manage_metric_views action="create" full_name="catalog.schema.sales_metrics" source="catalog.schema.sales" ...

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 for consistent KPI reporting?

You define governed business metrics in Databricks using YAML-based metric definitions that are applied to source tables as Unity Catalog metric views. This approach ensures consistent, reusable KPIs across teams and dashboards.

What are Databricks Unity Catalog metric views and when do I need them?

Databricks Unity Catalog metric views are standardized objects for defining, querying, and managing governed business metrics. You need them when building consistent KPIs across different dashboards, teams, and AI/BI tools.

Can I use YAML to manage and version control Databricks metric views?

Yes, you can define and maintain metric view definitions in YAML files. This allows you to version control and collaborate on standardized business metrics across your Databricks environments.

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

Yes, creating and managing metric views requires Databricks Runtime 17.2 or later. You also need appropriate permissions within your Databricks environment to apply these definitions to source tables.

How do I apply a YAML metric definition to a Databricks sales table?

You apply a YAML metric definition to a Databricks source table using the manage_metric_views action parameter. You specify the action as create, provide the target full_name, and set the source table.

Are there limitations when using Databricks metric views for SQL analytics?

Databricks metric views require Databricks Runtime 17.2+ and appropriate permissions. They are designed for standardized KPIs and revenue analytics, but environment compatibility is essential for seamless materialization.