Actions33
- Genie Actions
- Databricks SQL Actions
- Unity Catalog Actions
- Model Serving Actions
- Files Actions
- Vector Search Actions
Files → Get File Metadata
AI-generatedOverview
This node operation retrieves metadata information about a specific file stored in a Databricks Unity Catalog volume. It is useful for scenarios where you need to obtain details such as file size, content type, and last modification date without downloading the file itself. For example, you might use this operation to check if a file exists, verify its size before processing, or log file attributes for auditing purposes.
Use Case Examples
- Get metadata of a file before deciding to download or process it.
- Check the last modified date of a file to determine if it needs updating.
- Retrieve content type and size for logging or validation.
Properties
| Name | Meaning |
|---|---|
| Volume Path | The full path to the volume in the format catalog.schema.volume, specifying the location of the file within the Unity Catalog. |
| File Path | The path to the file within the specified volume, without a leading slash, indicating the exact file to retrieve metadata for. |
Output
JSON
volumePath- The full volume path used in the request.filePath- The file path within the volume.headerscontent-length- The size of the file in bytes.content-type- The MIME type of the file.last-modified- The last modification date of the file.
Dependencies
- Requires Databricks API credentials with a host URL and an API token for authentication.
Troubleshooting
- Ensure the volume path is correctly formatted as catalog.schema.volume; otherwise, an error will be thrown.
- If the file does not exist or the path is incorrect, the API may return an error or empty metadata.
- Network or authentication errors may occur if the API token is invalid or the host URL is incorrect.
- Check for proper permissions to access the specified volume and file in Databricks Unity Catalog.
Links
- Databricks Files API - Official documentation for managing files in Databricks Unity Catalog volumes.