Actions42
- Genie Actions
- Databricks SQL Actions
- Unity Catalog Actions
- Model Serving Actions
- Files Actions
- Vector Search Actions
Overview
This node operation allows users to delete a directory within the Databricks Unity Catalog file system. It is useful for managing and organizing files stored in Databricks volumes by removing unwanted or obsolete directories. Typical scenarios include cleaning up project folders, removing temporary data directories, or automating maintenance tasks in data pipelines.
For example, if you have a folder named "myfolder/subfolder" in a specific volume of your Unity Catalog, this operation can delete that entire directory path, freeing up space and keeping your storage organized.
Properties
| Name | Meaning |
|---|---|
| Catalog | Selects the Unity Catalog from which to access files. |
| Schema | Selects the schema within the chosen catalog. |
| Volume | Selects the volume within the chosen catalog and schema where the directory resides. |
| Directory Name | The name (and optionally subpath) of the directory to delete, e.g., "folder1" or "folder1/subfolder". |
Output
The output JSON contains a success confirmation and a message indicating the result of the deletion operation. For example:
{
"success": true,
"message": "Directory deleted successfully"
}
If an error occurs, the output will contain an error message describing the issue.
Dependencies
- Requires an API authentication token credential to connect to the Databricks API.
- Needs proper permissions on the Unity Catalog, schema, and volume to perform directory deletions.
- The node uses the Databricks REST API endpoints under
/api/2.1/unity-catalogand/api/2.0/fs/files/Volumes.
Troubleshooting
Common Issues:
- Insufficient permissions to delete directories in the specified volume.
- Incorrect catalog, schema, or volume selection leading to "not found" errors.
- Network connectivity issues preventing API calls.
Error Messages:
API Error: <status> <statusText>: Indicates a failure response from the Databricks API. Check credentials, permissions, and input parameters.Network Error: No response received from server: Suggests network problems or incorrect host configuration.- Validation errors if required properties like Catalog, Schema, Volume, or Directory Name are missing or invalid.
Resolution Tips:
- Verify that the API token has sufficient privileges.
- Double-check the selected catalog, schema, and volume names.
- Ensure the directory path exists before attempting deletion.
- Confirm network connectivity and correct API host URL.
Links and References
- Databricks Unity Catalog API Documentation
- Databricks File System API
- n8n HTTP Request Node Documentation (for understanding underlying HTTP requests)