Actions35
- Genie Actions
- Databricks SQL Actions
- Unity Catalog Actions
- Model Serving Actions
- Files Actions
- Vector Search Actions
Overview
The Databricks node allows users to interact with the Databricks platform via its API, specifically enabling execution of SQL queries on a Databricks SQL warehouse. This is useful for data analysts, engineers, or developers who want to run custom SQL queries directly within their n8n workflows to retrieve, manipulate, or analyze data stored in Databricks.
A common scenario includes querying a specific SQL warehouse to fetch data subsets for reporting or further processing. For example, a user might execute a query like SELECT * FROM sales_data LIMIT 100 to get recent sales records and then use that data downstream in the workflow.
Properties
| Name | Meaning |
|---|---|
| Warehouse ID | The identifier of the SQL warehouse where the query will be executed. |
| Query | The SQL statement to run against the specified warehouse. |
| Additional Fields | Optional parameters including: • Catalog: The catalog context for the query. • Schema: The schema context for the query. • Timeout: Maximum time (in seconds) to wait for the query to complete. |
Output
The node outputs the results of the executed SQL query in the json field of the output data. This typically contains an array of objects representing rows returned by the query, with each object’s keys corresponding to column names.
If the query returns binary data (not typical for SQL queries), the node would handle it accordingly, but based on the provided code and properties, the primary output is structured JSON data representing query results.
Dependencies
- Requires connection to a Databricks workspace with a valid API host URL and an API authentication token.
- The node expects these credentials to be configured in n8n as an API key/token and host URL.
- No additional external dependencies are indicated beyond the Databricks API access.
Troubleshooting
Common issues:
- Invalid or expired API token leading to authorization errors.
- Incorrect Warehouse ID causing the query to fail or not find the target warehouse.
- Syntax errors in the SQL query resulting in query execution failure.
- Timeout errors if the query takes longer than the specified timeout period.
Error messages and resolutions:
- Authorization failed: Check that the API token is correct and has sufficient permissions.
- Warehouse not found: Verify the Warehouse ID is accurate and accessible.
- SQL syntax error: Review and correct the SQL query syntax.
- Query timeout: Increase the timeout value or optimize the query for faster execution.