databricks/databricks-agent-skills/databricks-dbsql
Claude Code and agent skill by databricks/databricks-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Databricks SQL (DBSQL) advanced features and SQL warehouse capabilities. This skill MUST be invoked when the user mentions: "DBSQL", "Databricks SQL", "SQL warehouse", "SQL scripting", "stored procedure", "CALL procedure", "materialized view", "CREATE MATERIALIZED VIEW", "pipe syntax", "|>", "geospatial", "H3", "ST_", "spatial SQL", "collation", "COLLATE", "ai_query", "ai_classify", "ai_extract", "ai_gen", "AI function", "http_request", "remote_query", "read_files", "Lakehouse Federation", "rec…
Install
npx vskill@latest install databricks/databricks-agent-skills/databricks-dbsqlSKILL.md
The same SKILL.md was published earlier as databricks/databricks-agent-skills/databricks-dbsql.
Databricks SQL (DBSQL) - Advanced Features
Quick Reference
| Feature | Key Syntax | Since | Reference | ||
|---|---|---|---|---|---|
| SQL Scripting | BEGIN...END, DECLARE, IF/WHILE/FOR | DBR 16.3+ | references/sql-scripting.md | ||
| Stored Procedures | CREATE PROCEDURE, CALL | DBR 17.0+ | references/sql-scripting.md | ||
| Recursive CTEs | WITH RECURSIVE | DBR 17.0+ | references/sql-scripting.md | ||
| Transactions | BEGIN ATOMIC...END | GA | references/sql-scripting.md | ||
| Materialized Views | CREATE MATERIALIZED VIEW | Pro/Serverless | references/materialized-views-pipes.md | ||
| Temp Tables | CREATE TEMPORARY TABLE | All | references/materialized-views-pipes.md | ||
| Pipe Syntax | `\ | >` operator | DBR 16.1+ | references/materialized-views-pipes.md | |
| Geospatial (H3) | h3_longlatash3(), h3_polyfillash3() | DBR 11.2+ | references/geospatial-collations.md | ||
| Geospatial (ST) | ST_Point(), ST_Contains(), 80+ funcs | DBR 16.0+ | references/geospatial-collations.md | ||
| Collations | COLLATE, UTF8_LCASE, locale-aware | DBR 16.1+ | references/geospatial-collations.md | ||
| AI Functions | ai_query(), ai_classify(), 11+ funcs | DBR 15.1+ | references/ai-functions.md | ||
| http_request | http_request(conn, ...) | Pro/Serverless | references/ai-functions.md | ||
| remote_query | SELECT * FROM remote_query(...) | Pro/Serverless | references/ai-functions.md | ||
| read_files | SELECT * FROM read_files(...) | All | references/read-files.md | ||
| Data Modeling | Star schema, Liquid Clustering | All | references/best-practices.md |
Common Patterns
SQL Scripting - Procedural ETL
Stored Procedure with Error Handling
Materialized View with Scheduled Refresh
Pipe Syntax - Readable Transformations
AI Functions - Enrich Data with LLMs
Geospatial - Proximity Search with H3
Collation - Case-Insensitive Search
http_request - Call External APIs
read_files - Ingest Raw Files
Recursive CTE - Hierarchy Traversal
remote_query - Federated Queries
Reference Files
Load these for detailed syntax, full parameter lists, and advanced patterns:
| File | Contents | When to Read | |
|---|---|---|---|
| references/sql-scripting.md | SQL Scripting, Stored Procedures, Recursive CTEs, Transactions | User needs procedural SQL, error handling, loops, dynamic SQL | |
| references/materialized-views-pipes.md | Materialized Views, Temp Tables/Views, Pipe Syntax | User needs MVs, refresh scheduling, temp objects, pipe operator | |
| references/geospatial-collations.md | 39 H3 functions, 80+ ST functions, Collation types and hierarchy | User needs spatial analysis, H3 indexing, case/accent handling | |
| references/ai-functions.md | 13 AI functions, http_request, remote_query | User needs AI enrichment, API calls, federation | |
| references/read-files.md | read_files (all options) | User needs file ingestion | |
| references/best-practices.md | Data modeling, performance, Liquid Clustering, anti-patterns | User needs architecture guidance, optimization, or modeling advice |
Key Guidelines
- Always use Serverless SQL warehouses for AI functions, MVs, and http_request
- Use `LIMIT` during development with AI functions to control costs
- Prefer Liquid Clustering over partitioning for new tables (1-4 keys max)
- Use `CLUSTER BY AUTO` when unsure about clustering keys
- Star schema in Gold layer for BI; OBT acceptable in Silver
- Define PK/FK constraints on dimensional models for query optimization
- Use `COLLATE UTF8_LCASE` for user-facing string columns that need case-insensitive search
- Test SQL via CLI (
databricks experimental aitools tools query) or notebooks before deploying. If--warehouseis rejected on your CLI version, setDATABRICKS_WAREHOUSE_IDin the environment instead.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/databricks-dbsql/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/databricks/databricks-agent-skills/databricks-dbsql)