databricks-dbsql

Guide Databricks SQL scripting, stored procedures, and advanced query features.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/juanlamadrid20/coda --skill databricks-dbsql-juanlamadrid20
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-dbsql
Source: https://github.com/juanlamadrid20/coda/tree/main/.claude/skills/databricks-dbsql
Command: npx skills add https://github.com/juanlamadrid20/coda --skill databricks-dbsql-juanlamadrid20

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers users to leverage the full potential of Databricks SQL, from advanced procedural scripting and stored procedures to cutting-edge features like AI functions and geospatial analysis.

Core Features & Use Cases

  • SQL Scripting & Stored Procedures: Write complex, multi-statement logic and encapsulate it for reuse.
  • Advanced SQL Features: Utilize pipe syntax, materialized views, AI functions, and geospatial capabilities.
  • Data Modeling & Performance: Learn best practices for structuring data and optimizing queries on the Databricks Lakehouse.
  • Use Case: You need to create a stored procedure that performs an upsert operation on a customer table, including error handling and logging. This Skill provides the exact syntax and patterns to achieve this efficiently.

Quick Start

Use the databricks-dbsql skill to create a stored procedure that calculates daily sales aggregates.

Frequently Asked Questions about databricks-dbsql

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

FAQPage Schema
How do I write a stored procedure in Databricks SQL for an upsert operation?

To create a stored procedure in Databricks SQL, you use SQL scripting to encapsulate multi-statement logic, enabling you to perform upserts with built-in error handling and logging for efficient reuse.

What are materialized views and how do they help with performance tuning in Databricks?

Materialized views in Databricks SQL precompute and cache complex query results, significantly accelerating performance tuning by allowing repeated access to aggregated data without reprocessing the underlying tables.

Can I use geospatial functions like H3 and ST within Databricks SQL?

Yes, Databricks SQL supports advanced geospatial functions including H3 indexing and ST functions, allowing you to perform spatial analysis and manipulate geometric data directly within your Lakehouse queries.

Does Databricks SQL support recursive CTEs and transactions?

Databricks SQL fully supports recursive CTEs for hierarchical data traversal and provides transaction capabilities, ensuring ACID compliance and reliable multi-statement data processing workflows.

What is the best way to structure data models on the Databricks Lakehouse?

The best way to structure data models on the Databricks Lakehouse involves following SQL data modeling best practices, utilizing temporary tables, pipe syntax, and Unity Catalog integration for optimized organization.

When should I use SQL scripting instead of standard queries in Databricks SQL?

You should use SQL scripting in Databricks SQL when you need to execute complex, multi-statement procedural logic, manage control flow, or build reusable routines like stored procedures that standard queries cannot handle.