DatabricksQueryTool
Description
Run SQL against Databricks workspace tables with either CLI profile or direct host/token authentication.Installation
Environment Variables
DATABRICKS_CONFIG_PROFILE
or (DATABRICKS_HOST
+DATABRICKS_TOKEN
)
Example
Code
Parameters
query
(required): SQL query to executecatalog
(optional): Override default catalogdb_schema
(optional): Override default schemawarehouse_id
(optional): Override default SQL warehouserow_limit
(optional): Maximum rows to return (default: 1000)
Defaults on initialization
default_catalog
default_schema
default_warehouse_id
Error handling & tips
- Authentication errors: verify
DATABRICKS_HOST
begins withhttps://
and token is valid. - Permissions: ensure your SQL warehouse and schema are accessible by your token.
- Limits: long‑running queries should be avoided in agent loops; add filters/limits.