databricks-dbsql
Skill by databricks
Guides an AI assistant through advanced Databricks SQL (DBSQL) features and SQL warehouse capabilities. It is for data engineers and analysts writing SQL on Databricks.
Install databricks-dbsql
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-dbsql ~/.claude/skills/databricks-dbsqlRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/databricks/databricks-agent-skills /tmp/databricks-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/databricks-agent-skills/skills/databricks-dbsql ~/.gemini/antigravity-cli/skills/databricks-dbsqlAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant guidance on advanced Databricks SQL (DBSQL) features. It covers SQL scripting, stored procedures, recursive CTEs, transactions, materialized views, temp tables, pipe syntax, geospatial H3 and ST functions, collations, AI functions, http_request, remote_query and read_files. A quick reference table lists each feature with its key syntax and the Databricks Runtime version where it is available. Detailed reference files cover full parameter lists and advanced patterns.
The skill includes SQL examples for procedural ETL, upserts with error handling, proximity search with H3, case-insensitive collations and API calls with http_request. It also lists guidelines, such as using Serverless SQL warehouses for AI functions, materialized views and http_request, and preferring Liquid Clustering over partitioning. It is aimed at people building data pipelines and models on Databricks SQL. It has the parent skill databricks-core 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
- SQL scriptingWrite procedural SQL with BEGIN...END, DECLARE, and IF, WHILE and FOR loops.
- Stored proceduresCreate and call stored procedures with CREATE PROCEDURE and CALL, including error handling.
- Recursive CTEsTraverse hierarchies such as org charts using WITH RECURSIVE.
- Materialized viewsCreate materialized views with CLUSTER BY and SCHEDULE EVERY refresh settings.
- Pipe syntaxWrite readable transformations with the |> operator.
- Geospatial functionsUse H3 indexing and ST functions such as ST_Point and ST_Distance for spatial SQL.
- CollationsSet case-insensitive collations such as UTF8_LCASE on string columns.
- AI functionsEnrich data with ai_query, ai_classify, ai_extract and other AI functions in SQL.
- http_request and remote_queryCall external APIs with http_request and query federated sources with remote_query.
- read_filesIngest raw JSON and CSV files from Volumes with schema and format options.
What you need
- Databricks CLI version 1.0.0 or later
- Databricks SQL warehouse
- Serverless SQL warehouse for AI functions, materialized views and http_request
- Pro or Serverless plan for materialized views, http_request and remote_query
Try asking
- Write a recursive CTE to traverse an employee manager hierarchy in Databricks SQL
- Create a materialized view with an hourly refresh schedule in Databricks
- Classify support tickets with ai_classify in Databricks SQL
Good to know
- Feature availability depends on the Databricks Runtime version listed for each feature.
- Materialized views, http_request and remote_query are listed as Pro/Serverless features.
- AI functions can add cost, so the skill advises using LIMIT during development.
- If --warehouse is rejected by your CLI version, set DATABRICKS_WAREHOUSE_ID in the environment instead.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/databricks-dbsql/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to databricks-dbsql
All alternatives →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.
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.
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.
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.
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.
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.
Compare with kaggle-cli, bigquery-bigframes or data-loading
databricks-dbsql: common questions
What Databricks SQL features does this skill cover?
It covers SQL scripting, stored procedures, recursive CTEs, materialized views, pipe syntax, geospatial H3 and ST functions, collations, AI functions, http_request, remote_query and read_files.
Which SQL warehouse should I use with AI functions?
The skill says to always use Serverless SQL warehouses for AI functions, materialized views and http_request.
Does this skill need the Databricks CLI?
Yes. The source lists the databricks CLI version 1.0.0 or later as a requirement, and it names databricks-core as its parent skill.
How do I install databricks-dbsql?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is databricks-dbsql free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is databricks-dbsql safe to use?
It scores 72 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-dbsql?
Similar skills: kaggle-cli, bigquery-bigframes, data-loading, data-manager-api-setup.
