databricks-dbsql

Implement procedural SQL logic and advanced analytics within Databricks SQL.

Updated Sep 9, 2017
One-click install
npx skills add https://github.com/mirakui/dotfiles --skill databricks-dbsql-mirakui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-dbsql
Source: https://github.com/mirakui/dotfiles/tree/main/claude/skills/databricks-dbsql
Command: npx skills add https://github.com/mirakui/dotfiles --skill databricks-dbsql-mirakui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

DBSQL users often struggle to implement complex logic, procedural workflows, and AI-assisted analytics within SQL without a structured guide. The Databricks SQL feature set provides scripting, stored procedures, recursive queries, materialized views, and federated data access to streamline lakehouse work.

Core Features & Use Cases

  • Procedural SQL blocks (BEGIN...END), variables, loops, and error handling to build ETL and data orchestration inside DBSQL.
  • Stored procedures and dynamic SQL via EXECUTE IMMEDIATE for modular, reusable logic and cross-table operations.
  • Advanced patterns such as recursive CTEs, materialized views with incremental refresh, and Lakehouse Federation for remote queries and data integration.
  • Use cases include end-to-end data pipelines, data modeling, geospatial analysis with H3/ST, AI-enhanced queries, and governance-friendly data transformations.

Quick Start

Query a sample dataset to try a minimal procedural workflow by creating a DBSQL procedure that upserts a small table and then calling it.

Frequently Asked Questions about databricks-dbsql

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

FAQPage Schema
How do I implement procedural logic and loops in Databricks SQL?

Databricks SQL supports procedural logic using BEGIN...END blocks, variables, loops, and error handling. You can build ETL workflows and data orchestration directly inside DBSQL without external scheduling tools.

Can I use recursive CTEs and materialized views for data modeling in DBSQL?

Yes, DBSQL supports advanced data modeling patterns including recursive CTEs and materialized views with incremental refresh. These features help build scalable analytics pipelines within the Lakehouse.

What's the best way to query remote data sources in Databricks SQL?

Lakehouse Federation in Databricks SQL enables remote queries for federated data access. This integrates external data sources directly into your DBSQL workflows without requiring manual data extraction.

Does Databricks SQL support geospatial analysis and AI functions?

Databricks SQL includes AI functions for AI-backed data enrichment and supports geospatial analysis using H3 and ST functions. This enables advanced analytics directly within your SQL queries.

How do I create dynamic SQL and stored procedures in DBSQL?

DBSQL allows creating stored procedures and dynamic SQL via EXECUTE IMMEDIATE. This enables modular, reusable logic and cross-table operations for complex data transformations.