Databricks icon

Databricks

Interact with Databricks API

Overview

This node enables interaction with Databricks API, specifically supporting file operations within the Unity Catalog environment. The Download File operation under the Files resource allows users to retrieve files stored in a specified volume of a Unity Catalog schema.

Typical use cases include:

  • Automating retrieval of data files or configuration files stored in Databricks Unity Catalog volumes.
  • Integrating Databricks file storage with other workflows for processing or analysis.
  • Downloading specific files by path from a structured catalog-schema-volume hierarchy.

For example, a user can specify a catalog, schema, and volume, then provide the file name (path) to download that file's content for further processing or archiving.

Properties

Name Meaning
Catalog Select a Unity Catalog to access files from.
Schema Select a schema from the chosen catalog.
Volume Select a volume from the chosen catalog and schema.
File Name Name of the file to download, including optional folder path (e.g., "myfile.txt" or "folder/myfile.txt").

Output

The node outputs JSON data representing the downloaded file's content. Since the bundled code snippet does not explicitly show the download implementation, it is inferred that the output will contain the file data either as binary or base64 encoded content accessible via the binary property of the output item.

  • The json field typically contains metadata or success status.
  • The actual file content is expected to be available in the binary property of the output item, allowing downstream nodes to process or save the file.

Dependencies

  • Requires an API authentication token credential for Databricks with appropriate permissions to access Unity Catalog files.
  • Needs the host URL of the Databricks workspace.
  • The node uses HTTP requests to Databricks REST API endpoints under /api/2.1/unity-catalog and /api/2.0/fs/files/Volumes.
  • n8n environment must have network access to the Databricks instance.

Troubleshooting

  • Common issues:

    • Incorrect catalog, schema, or volume selection leading to "file not found" errors.
    • Insufficient permissions on the API token causing authorization failures.
    • Network connectivity problems preventing API calls.
    • Providing an incorrect file path format.
  • Error messages:

    • API errors will return HTTP status codes and messages; ensure the API token has correct scopes.
    • Network errors indicate no response from the server; verify network and host URL.
    • If the node fails but "Continue On Fail" is enabled, error details are returned in the output JSON.
  • Resolutions:

    • Double-check catalog, schema, volume, and file path inputs.
    • Verify API credentials and their permissions.
    • Confirm network connectivity and correct host URL.
    • Use logging/debugging features to inspect request URLs and responses.

Links and References

Discussion