databricks-agent-brick…
Create Agent Bricks: Knowledge Assistants (KA) for document Q&A and Supervisor Agents for…
Unity Catalog metric views: define, create, query, and manage governed business metrics in YAML. Use when building standardized KPIs, revenue metrics, order analytics, or any reusable business metrics that need consistent definitions across teams and tools.
$ npx -y skills add databricks/databricks-agent-skills --skill databricks-metric-views --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/databricks-metric-viewsContext preview
The summary Claude sees to decide when to auto-load this skill.
Unity Catalog metric views: define, create, query, and manage governed business metrics in YAML. Use when building standardized KPIs, revenue metrics, order analytics, or any reusable business metrics that need consistent definitions across teams and tools.
name: databricks-metric-views description: "Unity Catalog metric views: define, create, query, and manage governed business metrics in YAML. Use when building standardized KPIs, revenue metrics, order analytics, or any reusable business metrics that need consistent definitions across teams and tools." compatibility: Requires databricks CLI (>= v1.0.0) metadata: version: "0.1.0" parent: databricks-core
Define reusable, governed business metrics in YAML that separate measure definitions from dimension groupings for flexible querying.
Use this skill when:
| Task | Reference | Load when | |------|-----------|-----------| | **Create** | [metric-view-advisor.md](references/metric-view-advisor.md) | Any creation task — the advisor handles the full workflow (profile schema, analyze sources, suggest, deploy). Load [create-patterns.md](references/create-patterns.md) alongside as the YAML spec and pattern reference. | | **YAML spec / patterns** | [create-patterns.md](references/create-patterns.md) | Patterns 1–12, full YAML field reference, formatting gotchas, deployment errors, quick reference. Companion to the advisor; also load directly for pattern lookup. | | **Query** | [query-patterns.md](references/query-patterns.md) | Writing SQL against a metric view — `MEASURE()` basics, filters, join rollups, window measures, Rules 1–3. | | **Genie integration** | [metric-view-advisor.md §Genie Design Rules](references/metric-view-advisor.md#genie-design-rules) | One-fact-source rule, base views, domain organization, naming. Agent metadata fields (`comment`, `synonyms`, `display_name`, `format`) are in [create-patterns.md §YAML Field Reference](references/create-patterns.md#yaml-field-reference). |
Typical flow: **advisor → create → query/validate → Genie integration (if adding to a Genie Agent)**.
To source-control a metric view, commit its complete SQL definition and execute it through a bundle-managed SQL job. DABs do not have a native metric-view resource, but a bundle-managed SQL job can apply a committed definition:
# databricks.yml
bundle:
name: orders_metrics
variables:
catalog: { default: main }
schema: { default: default }
warehouse_id: { default: "" }
resources:
jobs:
deploy_orders_metrics:
name: deploy_orders_metrics
parameters:
- name: catalog
default: ${var.catalog}
- name: schema
default: ${var.schema}
tasks:
- task_key: create_metric_view
sql_task:
warehouse_id: ${var.warehouse_id}
file:
path: ../src/orders_metrics.metric_view.sqlDeploy and run:
databricks bundle deploy --target <TARGET> --profile <PROFILE> databricks bundle run deploy_orders_metrics --target <TARGET> --profile <PROFILE>
See the official [metric view bundle example](https://github.com/databricks/bundle-examples/tree/main/knowledge_base/metric_view).
Build on Databricks with AI coding agents such as Claude Code, Cursor, Codex, and GitHub Copilot. This repository provides the skills and agent plugins for Databricks AI Tools.
Repo: databricks/databricks-agent-skills
Create Agent Bricks: Knowledge Assistants (KA) for document Q&A and Supervisor Agents for…
Use Databricks built-in AI Functions (ai_classify, ai_extract, ai_summarize, ai_mask,…
Create Databricks AI/BI dashboards. Must use when creating, updating, or deploying Lakeview…
Design the UX of custom-code Databricks Apps (AppKit/React) data screens — KPI/overview…
Python backend for Databricks Apps — FastAPI (default), Flask, Dash, Streamlit, Gradio,…
Build apps on Databricks Apps platform. Use when asked to create data apps, analytics tools,…