skills/databricks/SKILL.md
--- Skill name: databricks Skill description: Query the Databricks Lakehouse using SQL. Use when user needs to query Databricks, search tables/catalogs, or run SQL against Databricks data. --- # Databricks Skill Query the Databricks Lakehouse using the Databricks CLI. ## Prerequisites ### Install Databricks CLI ```bash brew tap databricks/tap brew install databricks ``` ### Authenticate (First Time) ```bash databricks auth login --host https://<your-databricks-host>.cloud.databricks.com `
npx skillsauth add abhiroopb/synthetic-mind skills/databricksInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Query the Databricks Lakehouse using the Databricks CLI.
brew tap databricks/tap
brew install databricks
databricks auth login --host https://<your-databricks-host>.cloud.databricks.com
This opens a browser for OAuth login. After authenticating, tokens are cached at ~/.databricks/token-cache.json.
Set the host in your environment:
export DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com
Or pass it inline with each command.
Use the Statement Execution API to run SQL:
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "SELECT 1 as test",
"wait_timeout": "30s"
}'
Available warehouses:
Configure your warehouse IDs based on your Databricks workspace. Use databricks warehouses list to discover available warehouses.
Note: wait_timeout must be between 5s and 50s. For long queries, use 0s and poll for results.
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "SHOW CATALOGS",
"wait_timeout": "30s"
}' | jq -r '.result.data_array[][]'
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "SELECT table_catalog, table_schema, table_name FROM system.information_schema.tables WHERE lower(table_name) LIKE '\''%search_term%'\'' LIMIT 20",
"wait_timeout": "50s"
}' | jq '.result.data_array'
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "DESCRIBE catalog.schema.table_name",
"wait_timeout": "30s"
}' | jq '.result.data_array'
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "SELECT * FROM catalog.schema.table LIMIT 10",
"wait_timeout": "50s"
}' | jq '{columns: .manifest.schema.columns[].name, data: .result.data_array}'
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks warehouses list
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks clusters list
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks jobs list --limit 10
For queries that take longer than 50 seconds:
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api post /api/2.0/sql/statements --json '{
"warehouse_id": "<your-warehouse-id>",
"statement": "SELECT ... complex query ...",
"wait_timeout": "0s"
}'
# Returns: {"statement_id": "01f0f2e4-..."}
DATABRICKS_HOST=https://<your-databricks-host>.cloud.databricks.com \
databricks api get /api/2.0/sql/statements/STATEMENT_ID
| Issue | Solution |
|-------|----------|
| "no configuration file found" | Token cached but profile not saved - commands still work with DATABRICKS_HOST env var |
| OAuth token expired | Run databricks auth login --host https://<your-databricks-host>.cloud.databricks.com again |
| Query timeout | Use wait_timeout: "0s" and poll for results |
| Permission denied on table | Check catalog access - you may not have permissions to all catalogs |
ls -la ~/.databricks/token-cache.json
rm ~/.databricks/token-cache.json
databricks auth login --host https://<your-databricks-host>.cloud.databricks.com
Use SHOW CATALOGS to see all available catalogs you have access to. Catalogs are organization-specific and will vary by workspace.
testing
Track TV shows and movies with Trakt.tv. Search, get watchlist, history, up-next, recommendations, trending, calendar, ratings, stats, add/remove from watchlist, mark watched, rate, and check in. Use when asked about what to watch, TV shows, movies, watch history, or Trakt.
development
Send and receive SMS messages via Twilio API. Used for text message notifications, forwarding important alerts, and two-way SMS communication.
documentation
Organizes files in the local Downloads folder into proper folders. Use when asked to organize, sort, or file downloaded documents.
tools
Book and manage appointments on Sutter Health MyHealth Online portal. Uses browser automation via Playwright MCP to interact with the patient portal.