GET_RELATIVE_PATH

functionsupportedData loading & unloading

docs.snowflake.com ↗

File functions

Extracts the path of a staged file relative to its location in the stage using the stage name and absolute file path in cloud storage as inputs.

Syntax

GET_RELATIVE_PATH( @<stage_name> , '<absolute_file_path>' )

Parameters

NameRequiredDescription
stage_namerequiredName of the internal or external stage where the file is stored. Note If the stage name includes spaces or special characters, it must be enclosed in single quotes (e.g. '@"my stage"' for a stage named "my stage").
absolute_file_pathrequiredStage location, including the path and filename, of the file in cloud storage.

Returns

Path of the file relative to the stage location.

Usage notes