Databricks icon

Databricks

Interact with Databricks API

Overview

The node provides integration with the Databricks platform, specifically supporting multiple resources including Unity Catalog. For the Unity Catalog - List Volumes operation, it allows users to retrieve a list of volumes within a specified schema and catalog in their Databricks workspace.

This operation is useful when you want to programmatically explore or manage data storage structures defined in Unity Catalog, such as discovering available volumes before performing further data operations like reading or writing files.

Practical example:
A data engineer wants to automate the discovery of all volumes under a particular schema in Unity Catalog to dynamically configure downstream ETL jobs that read from those volumes.

Properties

Name Meaning
Catalog Select a Unity Catalog to work with. The list is automatically populated from your Databricks workspace.
Schema Select a schema from the chosen catalog. The list is dynamically loaded based on the selected catalog.

Output

  • The output JSON contains the response from the Databricks Unity Catalog API listing volumes under the specified catalog and schema.
  • The structure typically includes an array of volume objects, each describing metadata about a volume (e.g., name, comment, creation time).
  • No binary data output is produced by this operation.

Example output snippet (conceptual):

{
  "volumes": [
    {
      "name": "volume1",
      "comment": "Sample volume",
      "created_at": "2023-01-01T00:00:00Z"
    },
    {
      "name": "volume2",
      "comment": "",
      "created_at": "2023-02-01T00:00:00Z"
    }
  ]
}

Dependencies

  • Requires an active Databricks workspace with Unity Catalog enabled.
  • Needs an API authentication token credential configured in n8n for accessing the Databricks REST API.
  • The node uses the Databricks REST API endpoint /api/2.1/unity-catalog/volumes (implied by the context) to fetch volumes.
  • Network connectivity to the Databricks instance is required.

Troubleshooting

  • Common issues:

    • Invalid or expired API token: The request will fail with authorization errors. Ensure the API token is valid and has sufficient permissions.
    • Incorrect catalog or schema selection: If the catalog or schema does not exist or the user lacks access, the API will return errors.
    • Network connectivity problems: Timeouts or no response errors may occur if the Databricks host is unreachable.
  • Error messages:

    • API Error: 401 Unauthorized: Check API token validity and permissions.
    • API Error: 404 Not Found: Verify that the specified catalog and schema exist.
    • Network Error: No response received from server: Confirm network connectivity and correct Databricks host URL.
  • To handle errors gracefully, enable the node's "Continue On Fail" option to allow workflow execution to proceed even if some items fail.

Links and References

Discussion