smithery.ai

databricks-sql

A skill for using Databricks SQL (SQL Warehouse) via SDK. Supports both Python (databricks-sql-connector) and Node.js (@databricks/sql). Use when: - Connecting to SQL Warehouse from Databricks Apps to execute queries - Running queries from Python/Node.js scripts against SQL Warehouse - Troubleshooting SQL Warehouse connection errors - Learning SDK usage and best practices - "SQL Warehouse", "Databricks SQL", "databricks-sql-connector", "@databricks/sql" - "connect to warehouse", "execute SQL qu…

First seen May 4, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
Declared agents cursor
More metadata
version
1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,278 B
  • docs SUMMARY.md 623 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Databricks SQL SDK

Guide for connecting to Databricks SQL Warehouse via SDK and executing queries.

Note: This skill assumes Serverless SQL Warehouse. Serverless warehouses spin up in seconds, so no need to handle startup wait times.

SDK Selection

Language Package Use Cases
Python databricks-sql-connector Scripts, data processing, ML pipelines
Node.js @databricks/sql Databricks Apps (Fastify/Express), Web APIs

Finding SQL Warehouses

Use Databricks CLI to list available SQL Warehouses:

# List all SQL Warehouses
databricks warehouses list

# Get details of a specific warehouse
databricks warehouses get <warehouse_id>

The httppath for connection is: /sql/1.0/warehouses/<warehouseid>

Authentication

Use token authentication. For Databricks Apps, OAuth token is available from x-forwarded-access-token header.

# Python - Getting token in Databricks Apps
access_token = request.headers.get("x-forwarded-access-token")
// Node.js (Fastify) - Getting token in Databricks Apps
const accessToken = request.headers["x-forwarded-access-token"];

Quick Start

Python

from databricks import sql

with sql.connect(
    server_hostname="<workspace>.cloud.databricks.com",
    http_path="/sql/1.0/warehouses/<warehouse_id>",
    access_token="<token>"
) as conn:
    with conn.cursor() as cursor:
        cursor.execute("SELECT * FROM catalog.schema.table LIMIT 10")
        rows = cursor.fetchall()

Node.js

import { DBSQLClient } from "@databricks/sql";

const client = new DBSQLClient();
await client.connect({
  host: "<workspace>.cloud.databricks.com",
  path: "/sql/1.0/warehouses/<warehouse_id>",
  token: "<token>",
});

const session = await client.openSession();
const operation = await session.executeStatement("SELECT * FROM catalog.schema.table LIMIT 10");
const rows = await operation.fetchAll();

await operation.close();
await session.close();
await client.close();

Detailed Guides

  • Python SDK Details: [references/python-sdk.md](references/python-sdk.md) - Connection options, parameter binding, large data processing
  • Node.js SDK Details: [references/nodejs-sdk.md](references/nodejs-sdk.md) - Async processing, streaming, Fastify integration
  • Troubleshooting: [references/troubleshooting.md](references/troubleshooting.md) - Connection errors, timeouts, authentication issues
  • SQL Tips: [references/sql-tips.md](references/sql-tips.md) - Query optimization, best practices