Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

databricks-metric-views

Skill by databricks

Defines, creates and queries Unity Catalog metric views, which are governed business metrics written in YAML. Built for data teams that need consistent KPI definitions across dashboards, Genie and SQL queries.

  • Score 73
  • 425 stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install databricks-metric-views

Built from the published package, never by AI.

git clone --depth 1 https://github.com/databricks/databricks-agent-skills /tmp/databricks-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/databricks-agent-skills/skills/databricks-metric-views ~/.claude/skills/databricks-metric-views

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install databricks-metric-views in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

The databricks-metric-views skill helps an AI assistant create, query and manage Unity Catalog metric views. A metric view is a reusable business metric defined in YAML. It keeps measure definitions separate from dimension groupings, so the same metric can be queried flexibly. The skill covers star and snowflake schema joins, window measures such as moving averages, running totals and year-to-date, and materialization for pre-computed aggregations.

The skill also includes a decision gate. It explains when a metric should not be a metric view and should instead be built as a governed Unity Catalog SQL function. It is aimed at data teams building standardized KPIs, revenue metrics and order analytics that need consistent definitions across teams and tools. It is published by Databricks and requires the Databricks CLI, version 1.0.0 or later.

Written from the project's SKILL.md and checked against it.

What it can do

  • YAML metric definitionsDefines reusable measures and dimensions in YAML, separate from each other.
  • Window measuresSupports moving averages, running totals, period-over-period and YTD measures.
  • Star and snowflake joinsModels joins across tables within metric view definitions.
  • MaterializationEnables pre-computed metric aggregations.
  • Querying with MEASURE()Guides writing SQL against metric views using the MEASURE() function.
  • Metric view decision gateIdentifies measures that should be a governed SQL function instead of a metric view.
  • Genie integration rulesProvides design rules for using metric views with Genie Agents.
  • Source-controlled deploymentRuns committed metric view SQL through a bundle-managed SQL job.

What you need

  • Databricks Runtime 17.2+ for YAML version 1.1
  • Databricks Runtime 17.3+ for semantic metadata
  • Databricks CLI version 1.0.0 or later
  • SQL warehouse with CAN USE permission
  • SELECT on source tables and CREATE TABLE plus USE SCHEMA in the target schema

Try asking

  • Create a YAML metric view for monthly revenue from my orders table
  • Add a year-to-date window measure to my sales metric view
  • Query my revenue metric view by region using MEASURE()

Good to know

  • Databricks does not offer a native metric-view resource in DABs, so deployment runs through a SQL job.
  • Non-additive measures, such as distinct counts summed across dimensions, are not suited to metric views.
  • Semantic metadata fields require Databricks Runtime 17.3 or later.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/databricks-metric-views/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to databricks-metric-views

All alternatives →
kaggle-cliKaggle
94

Guides an assistant through the Kaggle CLI, covering competitions, datasets, notebooks, models, benchmarks, authentication and quota. It is for people who use the kaggle command-line tool.

AAA Skill 7.7k
bigquery-bigframesgoogle
94

Generates Python code that uses BigQuery DataFrames (BigFrames) for data processing, analysis and machine learning on BigQuery. It is meant for Python data tasks, and the source says to use bigquery-basics for SQL-first workflows.

AAA Skill 25k
data-loadingmicrosoft
94

Discovers connected data sources and proposes loading options when a workspace lacks the data a question needs. Suited to users who want to connect database, warehouse or cloud sources from the chat.

AAA Skill 18k
data-manager-api-setupgoogle
94

Guides developers through enabling the Data Manager API, setting up Application Default Credentials, and installing its client libraries. Built for developers who are getting started with the API and need local environment and access setup.

AAA Skill 25k
managed-airflow-dag-authoringgoogle
94

Guides authoring and validating Apache Airflow DAGs for Managed Service for Apache Airflow (MSAA), formerly Cloud Composer. Built for developers who create or extend Airflow DAGs in these environments.

AAA Skill 25k
data-feedsdavila7
94

Extracts structured JSON data from over 40 websites, including Amazon, LinkedIn, Instagram, TikTok, Facebook and YouTube. Built on Bright Data's Web Data APIs, it returns product details, profiles, reviews, posts and comments from a URL.

AAA Skill 34k

Compare with kaggle-cli, bigquery-bigframes or data-loading

databricks-metric-views: common questions

When should a metric be a Unity Catalog metric view?

Use one for measures that re-aggregate correctly at query time, such as additive SUM or COUNT, supported window measures and ratios. Non-additive or runtime-dependent measures should be a governed SQL function instead.

Which Databricks Runtime do I need?

Runtime 17.2 or later is needed for YAML version 1.1. Runtime 17.3 or later is needed for semantic metadata such as synonyms, display_name and format.

Can metric view definitions be source-controlled?

Yes. Commit the complete SQL definition and run it through a bundle-managed SQL job, since DABs have no native metric-view resource.

How do I install databricks-metric-views?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is databricks-metric-views free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is databricks-metric-views safe to use?

It scores 73 of 100. Grades: maintenance A, licence F, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to databricks-metric-views?

Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.

databricks-metric-views Install

Add to stack

Loading.