databricks-dbsql

Automate Databricks SQL workflows with procedural SQL, recursive queries, and materialized views.

4|4|Updated Jan 5, 2026
One-click install
npx skills add https://github.com/RamVegiraju/databricks-samples --skill databricks-dbsql-ramvegiraju
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databricks-dbsql
Source: https://github.com/RamVegiraju/databricks-samples/tree/main/.claude/skills/databricks-dbsql
Command: npx skills add https://github.com/RamVegiraju/databricks-samples --skill databricks-dbsql-ramvegiraju

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Databricks SQL (DBSQL) feature set is broad and complex; this skill consolidates procedural SQL, advanced queries, and integration patterns to help teams build robust production-grade Databricks SQL pipelines.

Core Features & Use Cases

  • Procedural SQL and control flow: BEGIN...END, DECLARE, IF/WHILE/FOR, and error handling, enabling ETL-like logic inside DBSQL.
  • Advanced constructs: stored procedures (CREATE PROCEDURE, CALL), recursive CTEs (WITH RECURSIVE), transactions, materialized views, and pipe syntax for readable transformations.
  • Integrations: http_request, remote_query federation, read_files ingestion, and geospatial + AI-function capabilities for end-to-end analytics.
  • Use cases: operational analytics with procedural ETL, complex data pipelines across Lakehouse environments, and reusable analytic patterns in Databricks SQL.

Quick Start

Create a simple stored procedure with a recursive CTE and refresh a materialized view to illustrate an end-to-end DBSQL workflow.

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?

Stored procedures in Databricks SQL use procedural control flow like CREATE PROCEDURE, DECLARE, and BEGIN...END to encapsulate ETL logic directly within DBSQL pipelines.

Can I use recursive CTEs in Databricks SQL?

Yes, Databricks SQL supports recursive CTEs using the WITH RECURSIVE construct, allowing you to query hierarchical data and perform complex transformations within DBSQL.

Does Databricks SQL support materialized views for analytics?

Databricks SQL supports materialized views to optimize operational analytics by pre-computing query results and enabling readable data transformations using pipe syntax.

How do I query external data sources with Lakehouse Federation in Databricks SQL?

Lakehouse Federation in Databricks SQL uses remote_query and http_request functions to integrate external data sources, enabling end-to-end analytics across Lakehouse environments.

What Databricks runtime features are required for procedural SQL?

Procedural SQL in Databricks requires runtime support for CREATE PROCEDURE, CALL, and WITH RECURSIVE to execute control flow, transactions, and error handling.