File functions

File functions enable you to access files staged in cloud storage.

List of functions

Function NameNotes
Stages
GET_STAGE_LOCATIONReturns the URL for an external or internal named stage using the stage name as the input.
GET_RELATIVE_PATHExtracts 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_PATHReturns 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_URLGenerates 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_URLGenerates a scoped Snowflake file URL to a staged file using the stage name and relative file path as inputs.
BUILD_STAGE_FILE_URLGenerates a Snowflake file URL to a staged file using the stage name and relative file path as inputs.
AI Functions
AI_COMPLETEGenerates a response (completion) from text or an image using a supported language model.
AI_PARSE_DOCUMENTReturns the extracted content from a document on a Snowflake stage as a JSON-formatted string.
AI_TRANSCRIBETranscribes text from an audio file with optional timestamps and speaker labels.

The following functions are for use with the FILE data type. For more information, see Unstructured data types.

Usage notes

  • GET_PRESIGNED_URL and BUILD_SCOPED_FILE_URL are non-deterministic functions; the others are deterministic.