Actions35
- Genie Actions
- Databricks SQL Actions
- Unity Catalog Actions
- Model Serving Actions
- Files Actions
- Vector Search Actions
Overview
The node interacts with the Databricks API, specifically supporting multiple resources including Files. For the Files resource, the List Directory operation allows users to retrieve a list of files and directories located at a specified path within the Databricks workspace.
This operation is useful when you want to explore or manage the file system in Databricks programmatically. For example, you might use it to:
- Display contents of a directory before processing files.
- Automate workflows that depend on the presence or metadata of files.
- Paginate through large directories by using page tokens.
Properties
| Name | Meaning |
|---|---|
| Path | The directory path in the Databricks workspace to list files from. Example: /Volumes/my-catalog/my-schema/... |
| Additional Fields | Optional parameters to customize the listing: |
| - Page Size | Number of files to return per page (default 1000). |
| - Page Token | Token for fetching the next page of results, used for pagination. |
Output
The output contains a JSON field representing the list of files and directories retrieved from the specified path. Each item typically includes metadata such as file name, type (file or directory), size, and timestamps.
No binary data output is indicated for this operation.
Dependencies
- Requires an active connection to the Databricks API.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The base URL for API requests is derived from the user's Databricks host configuration.
Troubleshooting
- Invalid Path Error: If the specified path does not exist or is incorrect, the API may return an error. Verify the path format and existence in the Databricks workspace.
- Authentication Failures: Ensure the API token credential is valid and has sufficient permissions to access the file system.
- Pagination Issues: When dealing with large directories, if no page token is provided or incorrectly handled, some files may be missed. Use the
Page Tokenproperty correctly to paginate through all results. - Rate Limits: Excessive requests may hit API rate limits; implement delays or retries as needed.