File functions | Snowflake Documentation (original) (raw)
File functions enable you to access files staged in cloud storage.
List of functions¶
Function Name | Notes |
---|---|
GET_STAGE_LOCATION | Returns the URL for an external or internal named stage using the stage name as the input. |
GET_RELATIVE_PATH | 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. |
GET_ABSOLUTE_PATH | Returns the absolute path of a staged file using the stage name and path of the file relative to its location in the stage as inputs. |
GET_PRESIGNED_URL | Generates the pre-signed URL to a staged file using the stage name and relative file path as inputs. Access files in an external stage using the function. |
BUILD_SCOPED_FILE_URL | Generates a scoped Snowflake file URL to a staged file using the stage name and relative file path as inputs. |
BUILD_STAGE_FILE_URL | Generates a Snowflake file URL to a staged file using the stage name and relative file path as inputs. |
The following functions are for use with the FILE data type. For more information, see Unstructured data types.
Sub-category | Function |
---|---|
Constructor | TO_FILE |
TRY_TO_FILE | |
Accessors | FL_GET_CONTENT_TYPE |
FL_GET_ETAG | |
FL_GET_FILE_TYPE | |
FL_GET_LAST_MODIFIED | |
FL_GET_RELATIVE_PATH | |
FL_GET_SCOPED_FILE_URL | |
FL_GET_SIZE | |
FL_GET_STAGE | |
FL_GET_STAGE_FILE_URL | |
Utility Functions | FL_IS_AUDIO |
FL_IS_COMPRESSED | |
FL_IS_DOCUMENT | |
FL_IS_IMAGE | |
FL_IS_VIDEO |
Usage notes¶
- GET_PRESIGNED_URL and BUILD_SCOPED_FILE_URL are non-deterministic functions; the others are deterministic.