databricks-dbsql

Implement Databricks SQL workflows with stored procedures and geospatial functions.

38|12|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/databrickslabs/coding-agents-databricks-apps --skill databricks-dbsql-databrickslabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-dbsql
Source: https://github.com/databrickslabs/coding-agents-databricks-apps/tree/main/.claude/skills/databricks-dbsql
Command: npx skills add https://github.com/databrickslabs/coding-agents-databricks-apps --skill databricks-dbsql-databrickslabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of implementing complex, production-grade Databricks SQL workflows without sifting through scattered official documentation, covering everything from procedural scripting and geospatial analytics to AI-powered data enrichment and performance optimization.

Core Features & Use Cases

  • Procedural SQL & Stored Procedures: Build reusable ETL pipelines with error handling, loops, and dynamic SQL for complex transformations, such as a customer upsert procedure that logs failures and returns row counts.
  • Advanced Query Patterns: Use pipe syntax for readable, DataFrame-like query pipelines, recursive CTEs for hierarchical data traversal (e.g., organizational charts or bill of materials), and materialized views for precomputed, automatically refreshed aggregations.
  • Specialized Built-in Functions: Leverage 39+ geospatial functions (H3 indexing, spatial joins), collation settings for case/accent-insensitive search, AI functions for text classification and summarization, http_request for external API calls, remote_query for federated database access, and read_files for direct volume ingestion.
  • Performance & Modeling Best Practices: Optimize query speed with Liquid Clustering, caching, and proper dimensional modeling, while following anti-pattern avoidance guidelines to reduce compute costs and improve maintainability.

Quick Start

Use the databricks-dbsql skill to write a SQL query that classifies the 100 most recent support tickets into billing, technical, or account categories using the ai_classify function, and returns each ticket's ID, original description, and assigned category.

Frequently Asked Questions about databricks-dbsql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write stored procedures in Databricks SQL for complex ETL pipelines?

You can build reusable Databricks SQL stored procedures with procedural scripting that includes error handling, loops, and dynamic SQL to execute complex data transformations like customer upserts with failure logging.

Can I use AI functions in Databricks SQL to classify text data?

Databricks SQL supports AI functions like ai_classify to enrich data directly within queries, allowing you to categorize support tickets into billing, technical, or account groups without leaving the SQL environment.

What is the best way to optimize query performance using materialized views in Databricks SQL?

Databricks SQL materialized views provide precomputed, automatically refreshed aggregations that optimize query performance, while Liquid Clustering and caching further reduce compute costs and improve maintainability.

Does Databricks SQL support geospatial analysis and spatial joins?

Databricks SQL includes over 39 specialized geospatial functions, supporting H3 indexing and spatial joins to perform advanced location-based analysis directly within your Lakehouse queries.

How do I query federated databases and external APIs using Databricks SQL?

Databricks SQL enables federated database access using the remote_query function and external API calls via http_request, while Lakehouse Federation queries allow seamless integration with external data sources.

When should I use recursive CTEs and pipe syntax in Databricks SQL?

Use recursive CTEs in Databricks SQL for hierarchical data traversal like organizational charts, and pipe syntax for readable DataFrame-like query pipelines that streamline complex transformations.