Skip to content

experimental: add databricks-metric-view-advisor skill#112

Open
dipankarkush-db wants to merge 5 commits into
databricks:mainfrom
dipankarkush-db:add-databricks-metric-view-advisor
Open

experimental: add databricks-metric-view-advisor skill#112
dipankarkush-db wants to merge 5 commits into
databricks:mainfrom
dipankarkush-db:add-databricks-metric-view-advisor

Conversation

@dipankarkush-db
Copy link
Copy Markdown

@dipankarkush-db dipankarkush-db commented May 29, 2026

Summary

Adds databricks-metric-view-advisor under experimental/, a self-contained skill that guides users through creating Unity Catalog metric views via an interactive, multi-step workflow.

Unlike a single-input "create a metric view" helper, this advisor synthesizes multiple input sources — gold/fact schemas, AI/BI dashboards, SQL query files, Genie spaces, and KPI spreadsheets — into richer, deduplicated suggestions. It also checks for semantic overlap with metric views that already exist in the target schema (offering extend / replace / create-alongside / skip), generates the YAML definitions, and walks deployment, verification, and sample queries end to end.

Per maintainer guidance, this lands in experimental/ to begin with (faster to merge while the stable tier is in flux).

Layout (standard skill anatomy):

experimental/databricks-metric-view-advisor/
├── SKILL.md                      # interactive 7-step workflow
├── references/
│   ├── cli-operations.md         # SQL exec, dashboard/Genie fetch, deploy/query mechanics
│   ├── input-handlers.md         # per-input-source analysis
│   ├── patterns.md               # YAML pattern templates
│   └── yaml-reference.md         # full YAML spec
├── examples/                     # sample KPI/query fixtures
├── agents/openai.yaml            # Codex metadata (generated, lightly curated)
└── assets/databricks.{svg,png}   # shared icons
  • Self-contained — no parent skill. All operations use the databricks CLI (experimental aitools tools query/discover-schema/get-default-warehouse) and the SQL Statements API for long DDL; the profile/auth prerequisite is inlined. No agent- or MCP-specific tooling.
  • manifest.json regenerated via scripts/skills.py generate; scripts/skills.py validate passes. Does not touch skills/, scripts/skills.py SKILL_METADATA, or .claude-plugin/.

Note: this is a different artifact from the existing experimental/databricks-metric-views reference skill — that one is a concise single-input reference imported from ai-dev-kit; this is a richer multi-source, interactive advisor. Left untouched.

Documentation safety checklist

  • Examples use least-privilege permissions (no unnecessary ALL PRIVILEGES, admin tokens, or broad scopes)
  • Elevated permissions are explicitly called out where required
  • Sensitive values are obfuscated (placeholder workspace IDs, URLs, no real tokens)
  • No insecure patterns introduced (e.g. disabled TLS verification, hardcoded credentials)

This pull request and its description were written by Isaac.

@dipankarkush-db dipankarkush-db force-pushed the add-databricks-metric-view-advisor branch from 4e2f55e to dd217a0 Compare May 29, 2026 22:36
Adds a guided, multi-source advisor for creating Unity Catalog metric
views. Unlike a single-input helper, it synthesizes schemas, AI/BI
dashboards, SQL query files, Genie spaces, and KPI files into richer,
deduplicated suggestions, checks for overlap with existing metric views,
and walks deployment end to end via an interactive 7-step workflow.

Ported from a Claude Code plugin and genericized to the open Agent
Skills standard:
- stable frontmatter (name, description, compatibility, metadata.version),
  parent: databricks-core
- all agent/MCP-specific tool calls replaced with databricks CLI + SQL
  Statements API (mechanics in references/cli-operations.md)
- auth/profile/warehouse handling deferred to the parent databricks-core
- least-privilege grants and obfuscated placeholders throughout

References: cli-operations, input-handlers, patterns, yaml-reference.
Registered in scripts/skills.py SKILL_METADATA and .claude-plugin
keywords; manifest regenerated via scripts/skills.py. validate passes.

Co-authored-by: Isaac
Signed-off-by: Dipankar Kushari <dipankar.kushari@databricks.com>
@dipankarkush-db dipankarkush-db force-pushed the add-databricks-metric-view-advisor branch from dd217a0 to 352b5ef Compare May 29, 2026 22:48
…rimental

Per maintainer guidance (Simon Faltum) to land faster while the stable
tier is in flux, relocate the skill from skills/ to experimental/.

- git mv skills/databricks-metric-view-advisor -> experimental/
- Drop `parent: databricks-core` and make the skill self-contained:
  experimental skills install standalone (`aitools install <name>
  --experimental` does not pull in databricks-core), so the parent
  reference would dangle. Re-inlined the profile/auth prerequisite in
  SKILL.md Step 1a and cli-operations.md; all CLI/SQL commands already
  live in references/cli-operations.md.
- De-register from stable plumbing: removed the SKILL_METADATA entry in
  scripts/skills.py and the "metric-view-advisor" keyword in
  .claude-plugin/plugin.json (the Claude marketplace plugin ships stable
  skills only).
- READMEs: removed the stable "Available Skills" bullet; added an entry
  to experimental/README.md (Analytics & Dashboards).
- Regenerated manifest.json (skill now under repo_dir: experimental).
  scripts/skills.py validate passes.

Co-authored-by: Isaac
Signed-off-by: Dipankar Kushari <dipankar.kushari@databricks.com>
@dipankarkush-db dipankarkush-db changed the title skills: add databricks-metric-view-advisor stable skill experimental: add databricks-metric-view-advisor skill May 30, 2026
…symlink

The run-output folder used a `latest` symlink (`ln -sfn run_<ts> latest`).
Symlinks work on a local POSIX filesystem but do NOT resolve in the
Databricks Workspace filesystem (where Genie Code runs) — the link object
is created but cannot be navigated or read through. Replace it with a
portable `latest.txt` pointer file (a single line naming the most recent
run folder), which works in every environment. Added a fallback note to
pick the lexicographically-largest run_* folder.

Co-authored-by: Isaac
Signed-off-by: Dipankar Kushari <dipankar.kushari@databricks.com>
…ploy-example SQL

- input-handlers.md: Input 5 step 2 referenced "Input 1, step 1" (catalog/
  schema DESCRIBE only); mapping KPIs to columns needs the table schema, so
  point to Input 1 step 2 (list tables + discover-schema), matching Input 3.
- patterns.md: the SQL Statements API deploy example used
  DATE_TRUNC(MONTH, ...) with the quotes dropped (invalid SQL). Use a
  quote-free EXTRACT(YEAR FROM ...) expr and add a note on escaping single
  quotes inside a single-quoted --json argument (or use --json @file).

Co-authored-by: Isaac
Signed-off-by: Dipankar Kushari <dipankar.kushari@databricks.com>
…ot prerequisite

Reorder the opening so the first paragraph states what the skill does and
when to use it, with the CLI prerequisite moving just below. Generic
skill-authoring hygiene — helps any agent/indexer that reads the title +
first paragraph, and mirrors the frontmatter description. No workflow or
behavior change.

Co-authored-by: Isaac
Signed-off-by: Dipankar Kushari <dipankar.kushari@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant