Actions51
- Genie Actions
- Databricks SQL Actions
- Unity Catalog Actions
- Model Serving Actions
- Files Actions
- Vector Search Actions
- Jobs Actions
- Clusters Actions
Files → Get File Metadata
AI-generatedSummary
Get the metadata of a file stored within a specified Unity Catalog volume in Databricks.
Inputs
- Volume Path (required) — Full path to the volume in the format: catalog.schema.volume (e.g., main.default.my_volume).
- File Path (required) — Path to the file within the volume, without a leading slash (e.g., folder/file.txt or file.txt).
Output shape
a single JSON object containing file metadata and HTTP headers related to the file, including content length, content type, and last modified date.
Returns metadata by performing a HEAD request on the file path. No file content is returned. Errors occur if the file path contains path traversal sequences (e.g., '..'). The metadata includes HTTP headers like content-length, content-type, and last-modified, along with provided volume and file path details.
Examples
Example 1: Get metadata for a specific file in a Unity Catalog volume
Set 'Volume Path' to 'main.default.my_volume', and 'File Path' to 'folder1/data.csv'. The operation performs a HEAD request on this specific file and returns metadata without downloading the file content.