databricks-ai-functions — Claude Code skill: AI functions in SQL
A skill that teaches your agent to call Databricks built-in AI functions from SQL and PySpark. Useful when a pipeline needs a model without endpoint setup.
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-codeWhat databricks-ai-functions does
The skill documents Databricks built-in functions: classification, field extraction, summarization, PII masking, translation, grammar fixing, generation, sentiment analysis, semantic similarity, document parsing, search prep, arbitrary endpoint queries and time series forecasting. Your agent gets a reference per function — input types, output shape, extra prerequisites.
It also ships task patterns and call templates. Classification and extraction return VARIANT, so you read fields with the : operator, for example :response[0]::STRING. In PySpark the same calls go inside expr(...). A separate section walks through a RAG pipeline: parse a document, chunk it, index, then query.
Baseline requirements are shared: DBR 15.1+ in notebooks or 15.4 ML LTS for batch, not SQL Warehouse Classic, and a region that supports AI Functions. Document parsing needs DBR 17.3+, search prep needs 18.2+. ai_query and ai_forecast add their own: a Pro or Serverless warehouse and CAN QUERY on the endpoint. Every call is a model inference billed per token and it is slow, so materialize the result into a Delta table once and query that cheap output afterwards. That part matters — re-invoking the function on every downstream query is how token bills get out of hand.
What it helps with
- route support tickets into fixed labels without a separate service
- pull structured fields out of text inside a SQL query
- redact personal data before an export
- build a RAG pipeline from PDFs: parse, chunk, index, query
- forecast a time series from an observations table
Example prompts for the agent
- Write a SQL query using ai_classify on the content column with labels technical, billing, other
- How do I read the response field from the VARIANT that ai_extract returns?
- Build a pipeline: ai_parse_document, then ai_prep_search, then index and query
How to install databricks-ai-functions
1Skills CLI (Vercel)
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code2Manually: put the files in place
~/.claude/skills/databricks-ai-functions/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/databricks-ai-functions/
1Skills CLI (Vercel)
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a codex2Manually: put the files in place
.agents/skills/databricks-ai-functions/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a cursor2Manually: put the files in place
.cursor/skills/databricks-ai-functions/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install databricks/databricks-agent-skills databricks-ai-functions2Manually: put the files in place
.github/skills/databricks-ai-functions/SKILL.md1Skills CLI (Vercel)
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a gemini-cli2Platform CLI
gemini skills install https://github.com/databricks/databricks-agent-skills --path skills/databricks-ai-functionsManually: put the files in place
.devin/skills/databricks-ai-functions/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about databricks-ai-functions
How do I install databricks-ai-functions in Claude?
Run npx skills add databricks/databricks-agent-skills --skill databricks-ai-functions -a claude-code. The skill lands in ~/.claude/skills/databricks-ai-functions/SKILL.md.
What does databricks-ai-functions do?
It gives your agent a reference for Databricks built-in AI functions plus call templates for SQL and PySpark. It also covers document parsing and building a RAG pipeline.
Which Databricks Runtime versions are required?
Baseline is DBR 15.1+ for notebooks or 15.4 ML LTS for batch, in a region that supports AI Functions. ai_parse_document needs 17.3+ and ai_prep_search needs 18.2+.