Databricks icon

Databricks

Interact with Databricks API

Files → Download File

AI-generated

Overview

This node operation downloads a file from a specified volume in Databricks Unity Catalog. It requires the user to provide the full volume path in the format 'catalog.schema.volume' and the file path within that volume. The node fetches the file as binary data, determines its MIME type, and outputs the file content along with metadata such as file name, size, content type, and the volume details.

Use Case Examples

  1. Downloading a report file stored in a specific Unity Catalog volume for further processing.
  2. Retrieving a configuration file from a Databricks volume to use in an automation workflow.

Properties

Name Meaning
Volume Path Full path to the volume in format: catalog.schema.volume, specifying the location of the file within Databricks Unity Catalog.
File Path Path to the file within the volume (e.g., 'folder/file.txt' or 'file.txt'). This should not include a leading slash.

Output

Binary

The binary output contains the downloaded file data encoded in base64, along with its MIME type and original file name.

JSON

  • fileName - The name of the downloaded file.
  • size - The size of the downloaded file in bytes.
  • contentType - The MIME type of the downloaded file.
  • catalog - The catalog part of the volume path.
  • schema - The schema part of the volume path.
  • volume - The volume part of the volume path.
  • filePath - The path of the file within the volume.

Dependencies

  • Requires Databricks API credentials including host URL and an API token for authentication.

Troubleshooting

  • Ensure the volume path is correctly formatted as 'catalog.schema.volume'. An incorrect format will cause an error.
  • If the file is not found or access is denied, verify the file path and permissions in Databricks Unity Catalog.
  • Network errors or API errors will be logged; check the error messages for details and ensure the API token is valid and has necessary permissions.
  • If the MIME type is not detected, the node defaults to 'application/octet-stream'. This is normal for unknown file types.

Links

Discussion