Skip to main content
skill CX Codex

databricks-metric-views — Claude Code skill

This skill writes governed business metrics as YAML and checks whether a given measure belongs in a metric view at all.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add databricks/databricks-agent-skills --skill databricks-metric-views -a claude-code
Open on GitHub

What databricks-metric-views does

The workflow starts with profiling your schema and ends with a deployable definition. Bundled references cover the YAML spec and its patterns, SQL written against a metric view through MEASURE(), and the design rules for feeding metrics to Genie. There is also a decision gate: measures that shift with the user's filter, aggregate a per-entity result, or converge iteratively should become a governed Unity Catalog SQL function instead of a metric view.

Requirements are concrete. You need the Databricks CLI at version 1.0.0 or higher, a SQL warehouse you can use, SELECT on the source tables, and CREATE TABLE plus USE SCHEMA in the target schema. YAML version 1.1 needs Databricks Runtime 17.2+, while synonyms, display_name and format need 17.3+. No CLI, no skill.

Because Declarative Automation Bundles have no native metric-view resource, the skill shows how to commit the full SQL definition and apply it through a bundle-managed SQL job. That keeps the definition in version control while dashboards, Genie and ad-hoc SQL all read the same numbers.

What it helps with

  • write revenue and order-count measures as YAML with separate dimensions
  • build a KPI layer shared by dashboards, Genie and SQL queries
  • define window measures such as moving averages and year-to-date totals
  • decide whether a measure can live in a metric view or needs a SQL function
  • keep a metric view definition in git and deploy it via a bundle

Example prompts for the agent

  • Write a metric view for revenue and order counts over the main.sales schema.
  • Check whether conversion rate works as a metric view or needs a governed SQL function.
  • Give me a SQL query against the metric view using MEASURE(), grouped by month.

How to install databricks-metric-views

1Skills CLI (Vercel)

npx skills add databricks/databricks-agent-skills --skill databricks-metric-views -a claude-code

2Manually: put the files in place

~/.claude/skills/databricks-metric-views/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/databricks-metric-views/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about databricks-metric-views

How do I install databricks-metric-views in Claude Code?

Run npx skills add databricks/databricks-agent-skills --skill databricks-metric-views -a claude-code. The skill lands at ~/.claude/skills/databricks-metric-views/SKILL.md.

What does databricks-metric-views do?

It helps you define Unity Catalog business metrics in YAML — measures, dimensions, window calculations — and flags measures that do not fit a metric view and belong in a SQL function.

What do I need before using it?

The Databricks CLI at version 1.0.0 or higher, a SQL warehouse with CAN USE, and rights on the source and target tables. YAML version 1.1 requires Databricks Runtime 17.2+, and semantic metadata requires 17.3+.

Similar skills

All skills for Data and databases →

From the same set18

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor