Databricks icon

Databricks

Interact with Databricks API

Overview

This node interacts with the Databricks API to manage files within the Unity Catalog environment. Specifically, for the Files - Delete File operation, it allows users to delete a file stored in a specified volume inside a schema and catalog of the Unity Catalog.

Common scenarios where this node is beneficial include:

  • Automating cleanup of obsolete or temporary files in Databricks Unity Catalog storage.
  • Managing file lifecycle by programmatically deleting files after processing.
  • Integrating file deletion into larger data workflows or pipelines that run on n8n.

Practical example:

  • A workflow that processes data files uploaded to Databricks and deletes them once processing is complete to save storage space.

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 delete (e.g., "myfile.txt" or "folder/myfile.txt").

Output

The output JSON structure for the delete file operation typically contains:

  • success: A boolean indicating whether the file deletion was successful.
  • message: A string message confirming the deletion or providing status information.

Example output JSON:

{
  "success": true,
  "message": "File deleted successfully from myfile.txt"
}

If the node supports binary data output for other operations (like upload/download), it would handle file content accordingly, but for delete operation, the output is purely JSON status information.

Dependencies

  • Requires an active connection to the Databricks API with appropriate credentials (an API authentication token).
  • The node uses the Databricks Unity Catalog API endpoints to manage files.
  • Proper permissions are needed on the selected catalog, schema, and volume to delete files.
  • 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 to delete files in the specified location.
    • Network connectivity problems preventing API calls.
    • Invalid or expired API authentication token.
  • Error messages and resolutions:

    • API Error: 404 Not Found — The specified file path does not exist. Verify the file name and path.
    • API Error: 403 Forbidden — Permission denied. Check user permissions on the catalog/schema/volume.
    • Network Error: No response received from server — Network or firewall issue. Ensure connectivity to Databricks.
    • API Error: 401 Unauthorized — Authentication failed. Refresh or update the API token credential.
  • Enable "Continue On Fail" in the node settings to allow workflow execution to proceed despite errors, useful for bulk operations.

Links and References

Discussion