Databricks icon

Databricks

Interact with Databricks API

Overview

The Databricks node allows interaction with various Databricks services via their API. Specifically, the Databricks SQL - List Tables operation retrieves a list of tables from a specified SQL warehouse. This is useful for users who want to programmatically explore or manage their Databricks SQL environment, such as fetching available tables before running queries or automating metadata management.

Practical examples include:

  • Automatically listing all tables in a given SQL warehouse to populate dropdowns in workflows.
  • Validating table existence before performing data transformations.
  • Integrating Databricks SQL metadata into broader data pipelines.

Properties

Name Meaning
Warehouse ID The ID of the SQL warehouse to use.
Additional Fields Optional parameters to refine the query:
  Catalog The catalog to use for the query (optional).
  Schema The schema to use for the query (optional).
  Timeout Query timeout in seconds (default is 60 seconds).

Output

The output JSON contains the list of tables retrieved from the specified SQL warehouse. Each item in the output array represents a table with its associated metadata as returned by the Databricks SQL API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token credential configured in n8n to authenticate requests to the Databricks API.
  • The node uses the base URL and token from the provided credentials to make HTTP requests.
  • No additional external dependencies are required beyond the Databricks API access.

Troubleshooting

  • Common issues:

    • Invalid or missing Warehouse ID will cause the API request to fail.
    • Incorrect or expired API token will result in authorization errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • API Error: <status> <statusText>: Indicates the Databricks API responded with an error status code. Check the Warehouse ID, catalog, schema, and token validity.
    • Network Error: No response received from server: Suggests network issues or incorrect host configuration.
    • Other generic errors will be logged with details; enabling "Continue On Fail" allows workflow continuation despite errors.

Links and References

Discussion