databricks-dbsql

Execute advanced Databricks SQL scripting, materialized views, and federation queries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Databricks SQL users often struggle with advanced features such as procedural scripting, materialized views, geospatial analysis, AI‑augmented queries, and federated data access, leading to fragmented knowledge and inefficient query design.

Core Features & Use Cases

  • SQL Scripting & Stored Procedures – Build reusable, multi‑statement logic with loops, error handling, and transaction control.
  • Materialized Views & Pipe Syntax – Pre‑compute aggregations and write readable transformation pipelines using the |> operator.
  • Geospatial & H3 Functions – Perform spatial joins, distance calculations, and hierarchical indexing for location‑based analytics.
  • AI Functions – Enrich data with ai_query, ai_classify, ai_extract, and call external services via http_request.
  • Lakehouse Federation (remote_query) – Query external databases like PostgreSQL directly from DBSQL.

Quick Start

Ask the skill to generate a CREATE MATERIALIZED VIEW statement for daily revenue using DBSQL.

Frequently Asked Questions about databricks-dbsql

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

FAQPage Schema
How do I create a materialized view in Databricks SQL?

To create a materialized view in Databricks SQL, you use standard SQL syntax to pre-compute and store aggregations. This feature allows you to build readable transformation pipelines for daily metrics like revenue using DBSQL.

Can I run geospatial analysis and H3 indexing in Databricks SQL?

Yes, Databricks SQL supports geospatial analysis and H3 functions. You can perform spatial joins, distance calculations, and hierarchical indexing directly within your queries for location-based analytics.

How do I use pipe syntax to transform data in DBSQL?

Pipe syntax in DBSQL uses the `|>` operator to write readable transformation pipelines. It allows you to chain multiple data operations sequentially, improving query readability over nested subqueries.

Can I query external databases like PostgreSQL directly from Databricks SQL?

Yes, Lakehouse Federation using `remote_query` allows you to query external databases like PostgreSQL directly from Databricks SQL. This avoids data duplication by running federated queries across external systems.

How do I use AI functions to enrich data in Databricks SQL?

Databricks SQL provides AI functions like `ai_query`, `ai_classify`, and `ai_extract` to enrich data. You can also call external services via `http_request` to integrate AI model inferences directly within SQL workflows.

Does Databricks SQL support stored procedures and transaction control?

Yes, Databricks SQL supports procedural scripting and stored procedures. You can build reusable, multi-statement logic complete with loops, error handling, and transaction control for complex data modeling.