All functions (alphabetical)

This topic provides a list of all Snowflake system-defined (i.e. built-in) functions, scalar or table, in alphabetical order.

The list includes:

  • The name of each function.
  • A summary of each function.
  • A list of the categories that the function belongs in.
Function NameSummaryCategory
A
ABSReturns the absolute value of a numeric expression.Numeric functions
ACOSComputes the inverse cosine (arc cosine) of its input; the result is a number in the interval [0, pi].Numeric functions
ACOSHComputes the inverse (arc) hyperbolic cosine of its input.Numeric functions
ADD_MONTHSAdds or subtracts a specified number of months to a date or timestamp, preserving the end-of-month information.Date & time functions
AGENT_RUN (SNOWFLAKE.CORTEX)Runs a Cortex Agent without an agent object and returns the response as JSON.String & binary functions
AGGEvaluates and returns the value of a metric in a semantic view when you run a query.Aggregate functions
AI_AGGReduces a column of text data using a natural language instruction.Aggregate functions , String & binary functions
AI_CLASSIFYClassifies text or images into categories that you specify.String & binary functions
AI_COMPLETE (Prompt object)Generates a response (completion) for a prompt object.String & binary functions
AI_COMPLETE (Single image)Generates a response (completion) for a text prompt using a supported language model.String & binary functions
AI_COMPLETE (Single string)Generates a response (completion) for a text prompt using a supported language model.String & binary functions
AI_COMPLETEGenerates a response (completion) from text or an image using a supported language model.String & binary functions , File functions
AI_COUNT_TOKENSReturns an estimate of the number of tokens in a prompt for the specified large language model or task-specific function.String & binary functions
AI_EMBEDCreates an embedding vector from text or an image.String & binary functions
AI_EXTRACT (Document AI legacy models)Extracts information from a file using a legacy Document AI model.String & binary functions
AI_EXTRACTExtracts information from an input string or file.String & binary functions
AI_FILTERClassifies free-form prompt inputs into a boolean.String & binary functions
AI_PARSE_DOCUMENTReturns the extracted content from a document on a Snowflake stage as a JSON-formatted string.String & binary functions
AI_REDACTDetects and redacts personally identifiable information (PII) from unstructured text data.String & binary functions
AI_SENTIMENTReturns overall and category sentiment in the given input text.String & binary functions
AI_SIMILARITYComputes a similarity score based on the vector cosine similarity value of the inputs’ embedding vectors.String & binary functions
AI_SUMMARIZE_AGGSummarizes a column of text data.Aggregate functions , String & binary functions
AI_TRANSCRIBETranscribes text from an audio or video file with optional timestamps and speaker labels.File functions
AI_TRANSLATETranslates the given input text from one supported language to another.String & binary functions
ALERT_HISTORYThis INFORMATION_SCHEMA table function can be used to query the history of alerts within a specified date range.Information Schema , Table functions
ALL_USER_NAMESReturns all user names in the current account.Context functions
ANY_VALUEReturns some value of the expression from the group.Aggregate functions , Window functions
APPLICATION_CALLBACK_HISTORYReturns information about the history of callback invocations for Snowflake Native Apps in your Snowflake account.Information Schema , Table functions
APPLICATION_CONFIGURATION_VALUE_HISTORYTable functions (Tables)Table functions (Tables)
APPLICATION_JSONReturns a JSON object that specifies the JSON message to use for a notification.Notification functions
APPLICATION_SPECIFICATION_STATUS_HISTORYReturns information about the history of the status changes for app specifications in your Snowflake account.Information Schema , Table functions
APPROX_COUNT_DISTINCTUses HyperLogLog to return an approximation of the distinct cardinality of the input (i.e. HLL(col1, col2, ... ) returns an approximation of COUNT(DISTINCT col1, col2, ... )).Aggregate functions , Window functions
APPROX_PERCENTILEReturns an approximated value for the desired percentile (that is, if column c has n numbers, APPROX_PERCENTILE(c, p) returns a number such that approximately n * p of the numbers in c are smaller than the returned number).Aggregate functions , Window functions
APPROX_PERCENTILE_ACCUMULATEReturns the internal representation of the t-Digest state (as a JSON object) at the end of aggregation.Aggregate functions , Window function syntax and usage
APPROX_PERCENTILE_COMBINECombines (merges) percentile input states into a single output state.Aggregate functions , Window function syntax and usage
APPROX_PERCENTILE_ESTIMATEReturns the desired approximated percentile value for the specified t-Digest state.Aggregate functions , Window function syntax and usage
APPROX_TOP_KUses Space-Saving to return an approximation of the most frequent values in the input, along with their approximate frequencies.Aggregate functions , Window functions
APPROX_TOP_K_ACCUMULATEReturns the Space-Saving summary at the end of aggregation.Aggregate functions , Window function syntax and usage
APPROX_TOP_K_COMBINECombines (merges) input states into a single output state.Aggregate functions , Window function syntax and usage
APPROX_TOP_K_ESTIMATEReturns the approximate most frequent values and their estimated frequency for the given Space-Saving state.Aggregate functions , Window function syntax and usage
APPROXIMATE_JACCARD_INDEXReturns an estimation of the similarity (Jaccard index) of inputs based on their MinHash states.Aggregate functions , Window functions
APPROXIMATE_SIMILARITYReturns an estimation of the similarity (Jaccard index) of inputs based on their MinHash states.Aggregate functions , Window function syntax and usage
ARRAY_AGGReturns the input values, pivoted into an array.Aggregate functions , Window functions , Semi-structured and structured data functions
ARRAY_APPENDReturns an array containing all elements from the source array as well as the new element.Semi-structured and structured data functions
ARRAY_CATReturns a concatenation of two arrays.Semi-structured and structured data functions
ARRAY_COMPACTReturns a compacted array with missing and null values removed, effectively converting sparse arrays into dense arrays.Semi-structured and structured data functions
ARRAY_CONSTRUCTReturns an array constructed from zero, one, or more inputs.Semi-structured and structured data functions
ARRAY_CONSTRUCT_COMPACTReturns an array constructed from zero, one, or more inputs; the constructed array omits any NULL input values.Semi-structured and structured data functions
ARRAY_CONTAINSReturns TRUE if the specified value is found in the specified array.Semi-structured and structured data functions
ARRAY_DISTINCTReturns a new ARRAY that contains only the distinct elements from the input ARRAY.Semi-structured and structured data functions
ARRAY_EXCEPTReturns a new ARRAY that contains the elements from one input ARRAY that are not in another input ARRAY.Semi-structured and structured data functions
ARRAY_FLATTENFlattens an ARRAY of ARRAYs into a single ARRAY.Semi-structured and structured data functions
ARRAY_GENERATE_RANGEReturns an ARRAY of integer values within a specified range (e.g. [2, 3, 4]).Semi-structured and structured data functions
ARRAY_INSERTReturns an array containing all elements from the source array as well as the new element.Semi-structured and structured data functions
ARRAY_INTERSECTIONReturns an array that contains the matching elements in the two input arrays.Semi-structured and structured data functions
ARRAY_MAXGiven an input ARRAY, returns the element with the highest value that is not a SQL NULL.Semi-structured and structured data functions
ARRAY_MINGiven an input ARRAY, returns the element with the lowest value that is not a SQL NULL.Semi-structured and structured data functions
ARRAY_POSITIONReturns the index of the first occurrence of an element in an array.Semi-structured and structured data functions
ARRAY_PREPENDReturns an array containing the new element as well as all elements from the source array.Semi-structured and structured data functions
ARRAY_REMOVEGiven a source ARRAY, returns an ARRAY with elements of the specified value removed.Semi-structured and structured data functions
ARRAY_REMOVE_ATGiven a source ARRAY, returns an ARRAY with the element at the specified position removed.Semi-structured and structured data functions
ARRAY_REVERSEReturns an array with the elements of the input array in reverse order.Semi-structured and structured data functions
ARRAY_SIZEReturns the size of the input array.Semi-structured and structured data functions
ARRAY_SLICEReturns an array constructed from a specified subset of elements of the input array.Semi-structured and structured data functions
ARRAY_SORTReturns an ARRAY that contains the elements of the input ARRAY sorted in ascending or descending order.Semi-structured and structured data functions
ARRAY_TO_STRINGReturns an input array converted to a string by casting all values to strings (using TO_VARCHAR) and concatenating them (using the string from the second argument to separate the elements).Semi-structured and structured data functions
ARRAY_UNION_AGGReturns an ARRAY that contains the union of the distinct values from the input arrays in a column.Aggregate functions , Window functions
ARRAY_UNIQUE_AGGReturns an ARRAY that contains all of the distinct values from the specified column.Aggregate functions , Window functions
ARRAYS_OVERLAPCompares whether two arrays have at least one element in common.Semi-structured and structured data functions
ARRAYS_TO_OBJECTReturns an OBJECT that contains the keys specified by one input ARRAY and the values specified by another input ARRAY.Semi-structured and structured data functions
ARRAYS_ZIPReturns an array of objects, each of which contains key-value pairs for an nth element in the input arrays.Semi-structured and structured data functions
AS_*<object_type>*You can use this family of functions to perform strict casting of VARIANT values to values of other data types.Semi-structured and structured data functions
AS_ARRAYCasts a VARIANT value to an ARRAY value.Semi-structured and structured data functions
AS_BINARYCasts a VARIANT value to a BINARY value.Semi-structured and structured data functions
AS_BOOLEANCasts a VARIANT value to a BOOLEAN value.Semi-structured and structured data functions
AS_CHAR , AS_VARCHARCasts a VARIANT value to a VARCHAR value.Semi-structured and structured data functions
AS_DATECasts a VARIANT value to a DATE value.Semi-structured and structured data functions
AS_DECIMAL , AS_NUMBERCasts a VARIANT value to a fixed-point NUMBER value, with optional precision and scale.Semi-structured and structured data functions
AS_DOUBLE , AS_REALCasts a VARIANT value to a floating-point value.Semi-structured and structured data functions
AS_INTEGERCasts a VARIANT value to an INTEGER.Semi-structured and structured data functions
AS_OBJECTCasts a VARIANT value to an OBJECT value.Semi-structured and structured data functions
AS_TIMECasts a VARIANT value to a TIME value.Semi-structured and structured data functions
AS_TIMESTAMP_*Casts a VARIANT value to the respective timestamp value.Semi-structured and structured data functions
ASCIIReturns the ASCII code for the first character of a string.String & binary functions
ASINComputes the inverse sine (arc sine) of its argument; the result is a number in the interval [-pi/2, pi/2].Numeric functions
ASINHComputes the inverse (arc) hyperbolic sine of its argument.Numeric functions
ATANComputes the inverse tangent (arc tangent) of its argument; the result is a number in the interval [-pi, pi].Numeric functions
ATAN2Computes the inverse tangent (arc tangent) of the ratio of its two arguments.Numeric functions
ATANHComputes the inverse (arc) hyperbolic tangent of its argument.Numeric functions
AUTO_REFRESH_REGISTRATION_HISTORYThis table function can be used to query the history of data files registered in the metadata for a specified external table or directory table and the credits billed for these operations.Information Schema , Table functions
AUTOMATIC_CLUSTERING_HISTORYThis table function is used for querying the Automatic Clustering history for given tables within a specified date range.Information Schema , Table functions
AVAILABLE_LISTING_REFRESH_HISTORYReturns the past 14 days of refresh history for an available listing or a database mounted from a listing using cross-cloud auto-fulfillment.Information Schema , Table functions
AVAILABLE_LISTINGSReturns all listings that are available for the consumer to discover and access.Information Schema , Table functions
AVGReturns the average of non-NULL records.Aggregate functions , Window functions
B
BASE64_DECODE_BINARYDecodes a Base64-encoded string to a binary.String & binary functions
BASE64_DECODE_STRINGDecodes a Base64-encoded string to a string.String & binary functions
BASE64_ENCODEEncodes the input (string or binary) using Base64 encoding.String & binary functions
[ NOT ] BETWEENReturns TRUE when the input expression (numeric or string) is within the specified lower and upper boundary.Conditional expression functions
BIND_VALUESThis INFORMATION_SCHEMA table function returns information about the values of bind variables used in queries.Information Schema , Table functions
BIT_LENGTHReturns the length of a string or binary value in bits.String & binary functions
BITANDReturns the bitwise AND of two numeric or binary expressions.Bitwise expression functions
BITAND_AGGReturns the bitwise AND value of all non-NULL numeric records in a group.Aggregate functions , Window functions , Bitwise expression functions
BITMAP_ABSOLUTE_POSITIONComputes the absolute bit position from a bucket number and a relative bit position.Aggregate functions
BITMAP_ANDReturns a bitmap that is the result of a bitwise AND operation on two input bitmaps.Aggregate functions
BITMAP_AND_AGGReturns a bitmap that is the result of a bitwise AND operation on all input bitmaps in a group (intersection).Aggregate functions
BITMAP_BIT_POSITIONGiven a numeric value, returns the relative position for the bit that represents that value in a bitmap.Aggregate functions
BITMAP_BUCKET_NUMBERGiven a numeric value, returns an identifier (“bucket number”) for the bitmap containing the bit that represents the value..Aggregate functions
BITMAP_CONSTRUCT_AGGReturns a bitmap with bits set for each distinct value in a group.Aggregate functions
BITMAP_COUNTGiven a bitmap that represents the set of distinct values for a column, returns the number of distinct value.Aggregate functions
BITMAP_ORReturns a bitmap that is the result of a bitwise OR operation on two input bitmaps.Aggregate functions
BITMAP_OR_AGGReturns a bitmap containing the results of a binary OR operation on the input bitmaps.Aggregate functions
BITMAP_TO_ARRAYReturns an ARRAY containing the positions of all bits that are set in the input bitmap.Aggregate functions
BITNOTReturns the bitwise negation of a numeric or binary expression.Bitwise expression functions
BITORReturns the bitwise OR of two numeric or binary expressions.Bitwise expression functions
BITOR_AGGReturns the bitwise OR value of all non-NULL numeric records in a group.Aggregate functions , Window functions , Bitwise expression functions
BITSHIFTLEFTShifts the bits for a numeric or binary expression n positions to the left.Bitwise expression functions
BITSHIFTRIGHTShifts the bits for a numeric or binary expression n positions to the right.Bitwise expression functions
BITXORReturns the bitwise XOR of two numeric or binary expressions.Bitwise expression functions
BITXOR_AGGReturns the bitwise XOR value of all non-NULL numeric records in a group.Aggregate functions , Window functions , Bitwise expression functions
BOOLANDComputes the Boolean AND of two numeric expressions.Conditional expression functions
BOOLAND_AGGReturns TRUE if all non-NULL Boolean records in a group evaluate to TRUE.Aggregate functions , Window functions , Conditional expression functions
BOOLNOTComputes the Boolean NOT of a single numeric expression.Conditional expression functions
BOOLORComputes the Boolean OR of two numeric expressions.Conditional expression functions
BOOLOR_AGGReturns TRUE if at least one Boolean record in a group evaluates to TRUE.Aggregate functions , Window functions , Conditional expression functions
BOOLXORComputes the Boolean XOR of two numeric expressions; that is, one of the expressions, but not both expressions, is true.Conditional expression functions
BOOLXOR_AGGReturns TRUE if exactly one Boolean record in the group evaluates to TRUE.Aggregate functions , Window functions , Conditional expression functions
BUILD_SCOPED_FILE_URLGenerates a scoped Snowflake file URL to a staged file using the stage name and relative file path as inputs.File functions
BUILD_STAGE_FILE_URLGenerates a Snowflake file URL to a staged file using the stage name and relative file path as inputs.File functions
C
CASEWorks like a cascading “if-then-else” statement.Conditional expression functions
CAST , ::Converts a value of one data type into another data type.Conversion functions
CBRTReturns the cubic root of a numeric expression.Numeric functions
CEILReturns values from input_expr rounded to the nearest equal or larger integer, or to the nearest equal or larger value with the specified number of places after the decimal point.Numeric functions
CHARINDEXSearches for the first occurrence of the first argument in the second argument and, if successful, returns the position (1-based) of the first argument in the second argument.String & binary functions
CHECK_JSONChecks the validity of a JSON document.Semi-structured and structured data functions
CHECK_XMLChecks the validity of an XML document.Semi-structured and structured data functions
CHR , CHARConverts a Unicode code point (including 7-bit ASCII) into the character that matches the input Unicode.String & binary functions
CLASSIFY_TEXT (SNOWFLAKE.CORTEX)Classifies free-form text into categories that you provide.String & binary functions
COALESCEReturns the first non-NULL expression among its arguments, or NULL if all its arguments are NULL.Conditional expression functions
COLLATEReturns a copy of the original string, but with the specified collation_specification property instead of the original collation_specification property.String & binary functions
COLLATIONReturns the collation specification of the expression.String & binary functions
COMPLETE (SNOWFLAKE.CORTEX) (multimodal)Given an image and a prompt, generates a response (completion) using a language model.String & binary functions
COMPLETE (SNOWFLAKE.CORTEX)Given a prompt, generates a response (completion) using your choice of supported language model.String & binary functions
COMPLETE_TASK_GRAPHSReturns the status of a completed graph run.Information Schema , Table functions
COMPRESSCompresses the input string or binary value with a compression method.String & binary functions
CONCAT , ||Concatenates one or more strings, or concatenates one or more binary values.String & binary functions
CONCAT_WSConcatenates two or more strings, or concatenates two or more binary values, and uses the first argument as a delimiter between the following strings.String & binary functions
CONDITIONAL_CHANGE_EVENTReturns a window event number for each row within a window partition when the value of the argument expr1 in the current row is different from the value of expr1 in the previous row.Window functions
CONDITIONAL_TRUE_EVENTReturns a window event number for each row within a window partition based on the result of the boolean argument expr1.Window functions
CONTAINSReturns true if expr1 contains expr2.String & binary functions
CONVERT_TIMEZONEConverts a timestamp to another time zone.Date & time functions
COPY_HISTORYThis table function can be used to query Snowflake data loading history along various dimensions within the last 14 days.Information Schema , Table functions
CORRReturns the correlation coefficient for non-null pairs in a group.Aggregate functions , Window functions
CORTEX_SEARCH_DATA_SCANThis table function returns the data indexed by a Cortex Search service, including the columns defined in the source query and the computed vector embeddings for the search column.Table functions
CORTEX_SEARCH_REFRESH_HISTORYThis table function returns information about each refresh (completed and running) of Cortex Search services.Information Schema , Table functions
COSComputes the cosine of its argument; the argument should be expressed in radians.Numeric functions
COSHComputes the hyperbolic cosine of its argument.Numeric functions
COTComputes the cotangent of its argument; the argument should be expressed in radians.Numeric functions
COUNTReturns either the number of non-NULL records for the specified columns, or the total number of records.Aggregate functions , Window functions
COUNT_IFReturns the number of records that satisfy a condition or NULL if no records satisfy the condition.Aggregate functions , Window functions
COUNT_TOKENS (SNOWFLAKE.CORTEX)Returns the number of tokens in a prompt for the large language model or the task-specific function specified in the argument.String & binary functions
COVAR_POPReturns the population covariance for non-null pairs in a group.Aggregate functions , Window functions
COVAR_SAMPReturns the sample covariance for non-null pairs in a group.Aggregate functions , Window functions
CUME_DISTFinds the cumulative distribution of a value with regard to other values within the same window partition.Window functions
CUMULATIVE_PRIVACY_LOSSESReturns the privacy budgets associated with a specific privacy policy.Table functions
CURRENT_ACCOUNTReturns the account locator used by the user’s current session.Context functions
CURRENT_ACCOUNT_NAMEReturns the name of the current account.Context functions
CURRENT_AVAILABLE_ROLESReturns a list of all account-level roles granted to the current user.Context functions
CURRENT_CLIENTReturns the version of the client from which the function was called.Context functions
CURRENT_DATABASEReturns the name of the current database, which varies depending on where you call the function.Context functions
CURRENT_DATEReturns the current date of the system.Context functions
CURRENT_IP_ADDRESSReturns the IP address of the client that submitted the request.Context functions
CURRENT_ORGANIZATION_NAMEReturns the name of the organization to which the current account belongs.Context functions
CURRENT_ORGANIZATION_USERReturns the name of the user currently logged into the system, but only if the user is an organization user.Context functions
CURRENT_REGIONReturns the name of the region for the account where the current user is logged in.Context functions
CURRENT_ROLEReturns the name of the primary role in use for the current session when the primary role is an account-level role or NULL if the role in use for the current session is a database role.Context functions
CURRENT_ROLE_TYPECalling the CURRENT_ROLE_TYPE function returns ROLE if the current active (primary) role in the session is an account role.Context functions
CURRENT_SCHEMAReturns the name of the current schema, which varies depending on where you call the function.Context functions
CURRENT_SCHEMASReturns active search path schemas.Context functions
CURRENT_SECONDARY_ROLESReturns the secondary roles in use for the current session.Context functions
CURRENT_SESSIONReturns a unique system identifier for the Snowflake session corresponding to the present connection.Context functions
CURRENT_STATEMENTReturns the SQL text of the statement that is currently executing.Context functions
CURRENT_TASK_GRAPHSReturns the status of a graph run that is currently scheduled or is executing.Information Schema , Table functions
CURRENT_TIMEReturns the current time for the system.Context functions
CURRENT_TIMESTAMPReturns the current timestamp for the system in the local time zone.Context functions
CURRENT_TRANSACTIONReturns the transaction id of an open transaction in the current session.Context functions
CURRENT_USERReturns the name of the user currently logged into the system.Context functions
CURRENT_VERSIONReturns the current Snowflake version.Context functions
CURRENT_WAREHOUSEReturns the name of the warehouse in use for the current session.Context functions
D
DATA_AGENT_RUN (SNOWFLAKE.CORTEX)Runs a Cortex Agent and returns the response as JSON.String & binary functions
DATA_METRIC_FUNCTION_EXPECTATIONSReturns information about the expectations that exist in the account.Information Schema , Table functions
DATA_METRIC_FUNCTION_REFERENCESReturns a row for each object that has the specified data metric function assigned to the object or returns a row for each data metric function assigned to the specified object.Information Schema , Table functions
DATA_QUALITY_MONITORING_EXPECTATION_STATUSFor a specified object, returns a row for every time a data metric function (DMF) with an expectation was run.LOCAL schema , Table functions
DATA_QUALITY_MONITORING_RESULTSReturns a row for each data metric function assigned to the specified object, which includes the evaluation result and other metadata of the data metric function on the object.LOCAL schema , Table functions
DATA_TRANSFER_HISTORYThis table function can be used to query the history of data transferred from Snowflake tables into a different cloud storage provider’s network (i.e. from Snowflake on AWS, Google Cloud Platform, or Microsoft Azure into the other cloud provider’s network) and/or geographical region within a specified date range.Information Schema , Table functions
DATABASE_REFRESH_HISTORYReturns the refresh history for a secondary database.Information Schema , Table functions
DATABASE_REFRESH_PROGRESS , DATABASE_REFRESH_PROGRESS_BY_JOBThe DATABASE_REFRESH_PROGRESS family of functions can be used to query the status of a database refresh along various dimensions.Information Schema , Table functions
DATABASE_REPLICATION_USAGE_HISTORYThis table function can be used to query the replication history for a specified database within a specified date range.Information Schema , Table functions
DATABASE_STORAGE_USAGE_HISTORYThis table function can be used to query the average daily storage usage, in bytes, for a single database (or all the databases in your account) within a specified date range.Information Schema , Table functions
DATASKETCHES_HLLReturns an approximation of the distinct cardinality of the input (that is, DATASKETCHES_HLL(col1) returns an approximation of COUNT(DISTINCT col1)).Aggregate functions , Window functions
DATASKETCHES_HLL_ACCUMULATEReturns the sketch at the end of aggregation.Aggregate functions , Window function syntax and usage
DATASKETCHES_HLL_COMBINECombines (merges) input sketches into a single output sketch.Aggregate functions , Window function syntax and usage
DATASKETCHES_HLL_ESTIMATEReturns the cardinality estimate for the given sketch.Aggregate functions , Window function syntax and usage
DATE_FROM_PARTSCreates a date from individual numeric components that represent the year, month, and day of the month.Date & time functions
DATE_PARTExtracts the specified date or time part from a date, time, or timestamp.Date & time functions
DATE_TRUNCTruncates a DATE, TIME, or TIMESTAMP value to the specified precision.Date & time functions
DATEADDAdds the specified value for the specified date or time part to a date, time, or timestamp.Date & time functions
DATEDIFFCalculates the difference between two date, time, or timestamp expressions based on the date or time part requested.Date & time functions
DAYNAMEExtracts the three-letter day-of-week name from the specified date or timestamp.Date & time functions
DBT_PROJECT_EXECUTION_HISTORYReturns the execution history of dbt Projects on Snowflake.Information Schema , Table functions
DECODECompares the select expression to each search expression in order.Conditional expression functions
DECOMPRESS_BINARYDecompresses the compressed BINARY input parameter.String & binary functions
DECOMPRESS_STRINGDecompresses the compressed BINARY input parameter to a string.String & binary functions
DECRYPTDecrypts a BINARY value using a VARCHAR passphrase.Encryption functions
DECRYPT_RAWDecrypts a BINARY value using a BINARY key.Encryption functions
DEGREESConverts radians to degrees.Numeric functions
DENSE_RANKReturns the rank of a value within a group of values, without gaps in the ranks.Window function syntax and usage
DIV0Performs division like the division operator (/), but returns 0 when the divisor is 0 (rather than reporting an error).Numeric functions
DIV0NULLPerforms division like the division operator (/), but returns 0 when the divisor is 0 or NULL (rather than reporting an error or returning NULL).Numeric functions
ACCEPTED_VALUES (system data metric function)Returns the number of records where the value of a column does not match a Boolean expression.Data metric functions
AVG (system data metric function)Returns the average value for the specified column in a table.Data metric functions
BLANK_COUNT (system data metric function)Returns the count of column values that are blank for the specified column in a table.Data metric functions
BLANK_PERCENT (system data metric function)Returns the percentage of column values that are blank for the specified column in a table.Data metric functions
DATA_METRIC_SCHEDULED_TIME (system data metric function)Returns the timestamp for when a DMF is scheduled to run or the current timestamp if the function is called manually.Data metric functions
DUPLICATE_COUNT (system data metric function)Returns the count of column values that have duplicates, including NULL values.Data metric functions
FRESHNESS (system data metric function)Returns how much time in seconds has elapsed since a table was last modified.Data metric functions
MAX (system data metric function)Returns the maximum value for the specified column in a table.Data metric functions
MIN (system data metric function)Returns the minimum value for the specified column in a table.Data metric functions
NULL_COUNT (system data metric function)Returns the total number of NULL values for the specified column in a table.Data metric functions
NULL_PERCENT (system data metric function)Returns the percentage of columns values that are NULL for the specified column in a table.Data metric functions
ROW_COUNT (system data metric function)Returns the total number of rows in a table.Data metric functions
STDDEV (system data metric function)Returns the standard deviation value for the specified column in a table.Data metric functions
UNIQUE_COUNT (system data metric function)Returns the total number of unique non-NULL values for the specified columns in a table.Data metric functions
DP_INTERVAL_HIGHReturns the upper bound of the noise interval, which is used by differential privacy to help analysts determine how much noise has been introduced into query results.Differential privacy functions
DP_INTERVAL_LOWReturns the lower bound of the noise interval, which is used by differential privacy to help analysts determine how much noise has been introduced into query results.Differential privacy functions
DYNAMIC_TABLE_GRAPH_HISTORYThis table function returns information on all dynamic tables in the current account.Information Schema , Table functions
DYNAMIC_TABLE_REFRESH_HISTORYThis table function returns information about each refresh (completed and running) of dynamic tables.Information Schema , Table functions
DYNAMIC_TABLESThis table function returns metadata about dynamic tables, including aggregate lag metrics and the status of the most recent refreshes, within 7 days of the current time.Information Schema , Table functions
E
EDITDISTANCEComputes the Levenshtein distance between two input strings.String & binary functions
EMAIL_INTEGRATION_CONFIGReturns a JSON object that specifies the email notification integration, recipients, and subject line to use for an email notification.Notification functions
EMBED_TEXT_768 (SNOWFLAKE.CORTEX)Creates a vector embedding of 768 dimensions from English-language text.String & binary functions
EMBED_TEXT_1024 (SNOWFLAKE.CORTEX)Creates a vector embedding of 1024 dimensions from text.String & binary functions
ENCRYPTEncrypts a VARCHAR or BINARY value using a VARCHAR passphrase.Encryption functions
ENCRYPT_RAWEncrypts a BINARY value using a BINARY key.Encryption functions
ENDSWITHReturns TRUE if the first expression ends with the second expression.String & binary functions
ENTITY_SENTIMENT (SNOWFLAKE.CORTEX)Returns sentiment scores for English-language text, including overall sentiment and specific sentiment for specified entities.String & binary functions
[ NOT ] EQUAL_NULLCompares whether two expressions are equal.Conditional expression functions
ESTIMATE_REMAINING_DP_AGGREGATESReturns the estimated number of aggregation functions that can be run before the limit of a privacy budget is reached.Differential privacy functions , Table functions
EXECUTE_AI_EVALUATIONStart or get the status of a Cortex Agent evaluation run.System functions
EXPComputes Euler’s number e raised to a floating-point value.Numeric functions
EXPLAIN_JSONThis function converts an EXPLAIN plan from JSON to a table.System functions
EXTERNAL_FUNCTIONS_HISTORYThis table function retrieves the history of external functions called by Snowflake for your entire Snowflake account.Information Schema , Table functions
EXTERNAL_TABLE_FILESThis table function can be used to query information about the staged data files included in the metadata for a specified external table.Information Schema , Table functions
EXTERNAL_TABLE_FILE_REGISTRATION_HISTORYThis table function can be used to query information about the metadata history for an external table.Information Schema , Table functions
EXTRACTExtracts the specified date or time part from a date, time, or timestamp.Date & time functions
EXTRACT_ANSWER (SNOWFLAKE.CORTEX)Extracts an answer to a given question from a text document.String & binary functions
EXTRACT_SEMANTIC_CATEGORIESReturns a set of categories (semantic and privacy) for each supported column in the specified table or view.System functions
F
FACTORIALComputes the factorial of its input.Numeric functions
FILTERFilters an array based on the logic in a lambda expression.Semi-structured and structured data functions
FINETUNE (‘CANCEL’) (SNOWFLAKE.CORTEX)Cancels the specified fine-tuning job from the current schema.String & binary functions
FINETUNE (‘CREATE’) (SNOWFLAKE.CORTEX)Creates a fine-tuning job.String & binary functions
FINETUNE (‘DESCRIBE’) (SNOWFLAKE.CORTEX)Describes the properties of a fine-tuning job.String & binary functions
FINETUNE (‘SHOW’) (SNOWFLAKE.CORTEX)Lists all the fine-tuning jobs in the current account.String & binary functions
FINETUNE (SNOWFLAKE.CORTEX)This function lets you create and manage large language models customized for your specific task.String & binary functions
FIRST_VALUEReturns the first value within an ordered group of values.Window function syntax and usage
FL_GET_CONTENT_TYPEReturns the content type (also known as the MIME type) of a FILE.File functions
FL_GET_ETAGReturns the content hash (ETAG) of a FILE.File functions
FL_GET_FILE_TYPEReturns the file type (modality) of a FILE.File functions
FL_GET_LAST_MODIFIEDReturns the last modified date of a FILE.File functions
FL_GET_RELATIVE_PATHReturns the relative path of a FILE.File functions
FL_GET_SCOPED_FILE_URLReturns the scoped URL of a FILE.File functions
FL_GET_SIZEReturns the size, in bytes, of a FILE.File functions
FL_GET_STAGEReturns the stage name of a FILE.File functions
FL_GET_STAGE_FILE_URLReturns the stage URL of a FILE.File functions
FL_IS_AUDIOChecks if the input is an audio FILE.File functions
FL_IS_COMPRESSEDChecks if the input is a compressed FILE.File functions
FL_IS_DOCUMENTChecks if the input is a document FILE.File functions
FL_IS_IMAGEChecks if the input is an image FILE.File functions
FL_IS_VIDEOChecks if the input is a video FILE.File functions
FLATTENFlattens (explodes) compound values into multiple rows.Table functions , Semi-structured and structured data functions
FLOORReturns values from input_expr rounded to the nearest equal or smaller integer, or to the nearest equal or smaller value with the specified number of places after the decimal point.Numeric functions
G
GENERATE_COLUMN_DESCRIPTIONGenerates a list of columns from a set of staged files that contain semi-structured data using the INFER_SCHEMA function output.Metadata functions
GENERATE_POSTGRES_ACCESS_TOKEN_FOR_USERGenerates a short-lived access token for a Snowflake user to use as a password when logging into a Snowflake Postgres instance that has the AUTHENTICATION_AUTHORITY attribute set to POSTGRES_OR_SNOWFLAKE.Generates a short-lived access token for a Snowflake user to use as a password when logging into a Snowflake Postgres instance that has the AUTHENTICATION_AUTHORITY attribute set to POSTGRES_OR_SNOWFLAKE.
GENERATORCreates rows of data based either on a specified number of rows, a specified generation period (in seconds), or both.Table functions
GETExtracts a value from an ARRAY or an OBJECT (or a VARIANT that contains an ARRAY or OBJECT).Semi-structured and structured data functions
GET_ABSOLUTE_PATHRetrieves 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.File functions
GET_AI_EVALUATION_DATA (SNOWFLAKE.LOCAL)Retrieves evaluation data for a Cortex Agent evaluation run.Table functions
GET_AI_OBSERVABILITY_LOGS (SNOWFLAKE.LOCAL)Retrieve log data for a Cortex Agent observability event, such as a warning or failure.Table functions
GET_AI_RECORD_TRACE (SNOWFLAKE.LOCAL)Retrieve a single trace record from a Cortex Agent evaluation run.Table functions
GET_ANACONDA_PACKAGES_REPODATAReturns a list of third-party packages that are available from Anaconda.System functions
GET_CONDITION_QUERY_UUIDReturns the query ID for the SQL statement executed for the condition of an alert.Context functions
GET_CONFIGURATION_VALUE (SYS_CONTEXT function)Returns the current value for the specified configuration.Context functions
GET_CONTACTSReturns the contacts associated with an object.Table functions
GET_DDLReturns a DDL statement that can be used to recreate the specified object.Metadata functions
GET_IGNORE_CASEExtracts a field value from an object; returns NULL if either of the arguments is NULL.Semi-structured and structured data functions
GET_JOB_HISTORYReturns the job history for Snowpark Container Services jobs that ran within the specified time range.Table functions
GET_LINEAGE (SNOWFLAKE.CORE)Given a Snowflake object, returns data lineage information upstream or downstream from that object.Table functions
GET_OBJECT_REFERENCESReturns a list of objects that a specified object references.Table functions
GET_PATH , :Extracts a value from semi-structured data using a path name.Semi-structured and structured data functions
GET_PRESIGNED_URLGenerates a pre-signed URL to a file on a stage using the stage name and relative file path as inputs.File functions
GET_PYTHON_PROFILER_OUTPUT (SNOWFLAKE.CORE)Returns output containing a report generated by the Python code profiler.System functions
GET_QUERY_OPERATOR_STATSReturns statistics about individual query operators within a query that has completed.System functions , Table functions
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.File functions
GET_STAGE_LOCATIONRetrieves the URL for an external or internal named stage using the stage name as the input.File functions
GETBITGiven an INTEGER value, returns the value of a bit at a specified position.Bitwise expression functions
GETDATEReturns the current timestamp for the system in the local time zone.Context functions
GETVARIABLEReturns the value associated with a SQL variable name.Context functions
GREATESTReturns the largest value from a list of expressions.Conditional expression functions
GREATEST_IGNORE_NULLSReturns the largest non-NULL value from a list of expressions.Conditional expression functions
GROUPINGDescribes which of a list of expressions are grouped in a row produced by a GROUP BY query.Aggregate functions
GROUPING_IDDescribes which of a list of expressions are grouped in a row produced by a GROUP BY query.Aggregate functions
H
H3_CELL_TO_BOUNDARYReturns the GEOGRAPHY object representing the boundary of an H3 cell.Geospatial functions
H3_CELL_TO_CHILDRENReturns an array of the INTEGER IDs of the children of an H3 cell for a given resolution.Geospatial functions
H3_CELL_TO_CHILDREN_STRINGReturns an array of the VARCHAR values containing the hexadecimal IDs of the children of an H3 cell for a given resolution.Geospatial functions
H3_CELL_TO_PARENTReturns the ID of the parent of an H3 cell for a given resolution.Geospatial functions
H3_CELL_TO_POINTReturns the GEOGRAPHY object representing the Point that is the centroid of an H3 cell.Geospatial functions
H3_COMPACT_CELLSReturns an array of VARIANT values that contain the INTEGER IDs of fewer, larger H3 cells that cover the same area as the H3 cells in the input.Geospatial functions
H3_COMPACT_CELLS_STRINGSReturns an array of VARIANT values that contain the VARCHAR hexadecimal IDs of fewer, larger H3 cells that cover the same area as the H3 cells in the input.Geospatial functions
H3_COVERAGEReturns an array of IDs (as INTEGER values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).Geospatial functions
H3_COVERAGE_STRINGSReturns an array of hexadecimal IDs (as VARCHAR values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).Geospatial functions
H3_GET_RESOLUTIONReturns the resolution of an H3 cell.Geospatial functions
H3_GRID_DISKReturns an array of the IDs of the H3 cells that are within the k-distance from the specified cell.Geospatial functions
H3_GRID_DISTANCEReturns the distance between two H3 cells specified by their IDs.Geospatial functions
H3_GRID_PATHReturns an array of the IDs of the H3 cells that represent the line between two cells.Geospatial functions
H3_INT_TO_STRINGConverts the INTEGER value of an H3 cell ID to hexadecimal format.Geospatial functions
H3_IS_PENTAGONReturns TRUE if the boundary of an H3 cell represents a pentagon.Geospatial functions
H3_IS_VALID_CELLReturns TRUE if the input represents a valid H3 cell.Geospatial functions
H3_LATLNG_TO_CELLReturns the INTEGER value of the H3 cell ID for a given latitude, longitude, and resolution.Geospatial functions
H3_LATLNG_TO_CELL_STRINGReturns the H3 cell ID in hexadecimal format (as a VARCHAR value) for a given latitude, longitude, and resolution.Geospatial functions
H3_POINT_TO_CELLReturns the INTEGER value of an H3 cell ID for a Point (specified by a GEOGRAPHY object) at a given resolution.Geospatial functions
H3_POINT_TO_CELL_STRINGReturns the hexadecimal value of an H3 cell ID for a Point (specified by a GEOGRAPHY object) at a given resolution.Geospatial functions
H3_POLYGON_TO_CELLSReturns an array of INTEGER values of the IDs of H3 cells that have centroids contained by a Polygon (specified by a GEOGRAPHY object).Geospatial functions
H3_POLYGON_TO_CELLS_STRINGSReturns an array of VARCHAR values of the hexadecimal IDs of H3 cells that have centroids contained by a Polygon (specified by a GEOGRAPHY object).Geospatial functions
H3_STRING_TO_INTConverts an H3 cell ID in hexadecimal format to an INTEGER value.Geospatial functions
H3_TRY_COVERAGEA special version of H3_COVERAGE that returns NULL if an error occurs when it attempts to return an array of IDs (as INTEGER values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).Geospatial functions
H3_TRY_COVERAGE_STRINGSA special version of H3_COVERAGE_STRINGS that returns NULL if an error occurs when it attempts to return an array of hexadecimal IDs (as VARCHAR values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).Geospatial functions
H3_TRY_GRID_DISTANCEA special version of H3_GRID_DISTANCE that returns NULL if an error occurs when it attempts to return the distance between two H3 cells.Geospatial functions
H3_TRY_GRID_PATHA special version of H3_GRID_PATH that returns NULL if an error occurs when it attempts to return an array of VARIANT values that contain the IDs of the H3 cells that represent the line between two cells.Geospatial functions
H3_TRY_POLYGON_TO_CELLSA special version of H3_POLYGON_TO_CELLS that returns NULL if an error occurs when it attempts to return an array of INTEGER values of the IDs of H3 cells that have centroids contained by a Polygon (specified by a GEOGRAPHY object).Geospatial functions
H3_TRY_POLYGON_TO_CELLS_STRINGSA special version of H3_POLYGON_TO_CELLS_STRINGS that returns NULL if an error occurs when it attempts to return an array of VARCHAR values of the hexadecimal IDs of H3 cells that have centroids contained by a Polygon (specified by a GEOGRAPHY object).Geospatial functions
H3_UNCOMPACT_CELLSReturns an array of VARIANT values that contain the INTEGER IDs of H3 cells at the specified resolution that cover the same area as the H3 cells in the input.Geospatial functions
H3_UNCOMPACT_CELLS_STRINGSReturns an array of VARIANT values that contain the VARCHAR hexadecimal IDs of H3 cells at the specified resolution that cover the same area as the H3 cells in the input.Geospatial functions
HASHReturns a signed 64-bit hash value.Hash functions
HASH_AGGReturns an aggregate signed 64-bit hash value over the (unordered) set of input rows.Aggregate functions , Window functions
HAVERSINECalculates the great-circle distance in kilometers between two points on the Earth’s surface, using the Haversine formula.Geospatial functions
HEX_DECODE_BINARYDecodes a hex-encoded string to a binary.String & binary functions
HEX_DECODE_STRINGDecodes a hex-encoded string to a string.String & binary functions
HEX_ENCODEEncodes the input using hexadecimal (also ‘hex’ or ‘base16’) encoding.String & binary functions
HLLUses HyperLogLog to return an approximation of the distinct cardinality of the input (i.e. HLL(col1, col2, ... ) returns an approximation of COUNT(DISTINCT col1, col2, ... )).Aggregate functions , Window functions
HLL_ACCUMULATEReturns the HyperLogLog state at the end of aggregation.Aggregate functions , Window functions
HLL_COMBINECombines (merges) input states into a single output state.Aggregate functions , Window functions
HLL_ESTIMATEReturns the cardinality estimate for the given HyperLogLog state.Aggregate functions , Window functions
HLL_EXPORTConverts input in BINARY format to OBJECT format.Aggregate functions , Window functions
HLL_IMPORTConverts input in OBJECT format to BINARY format.Aggregate functions , Window functions
HOUR / MINUTE / SECONDExtracts the corresponding time part from a time or timestamp value.Date & time functions
I
ICEBERG_TABLE_FILESReturns information about the data files registered to an externally managed Apache Iceberg™ table at a specified point in time.Table functions
ICEBERG_TABLE_SNAPSHOT_REFRESH_HISTORYReturns metadata and snapshot information about the most recent refresh history for a specified externally managed Apache Iceberg™ table.Table functions
IFFReturns one of two values depending on whether a Boolean expression evaluates to true or false.Conditional expression functions
IFNULLIf expr1 is NULL, returns expr2, otherwise returns expr1.Conditional expression functions
[ NOT ] ILIKEPerforms a case-insensitive comparison to determine whether a string matches or does not match a specified pattern.String & binary functions
ILIKE ANYPerforms a case-insensitive comparison to match a string against any of one or more specified patterns.String & binary functions
[ NOT ] INTests whether its argument is or is not one of the members of an explicit list or the result of a subquery.Conditional expression functions
INFER_SCHEMAAutomatically detects the file metadata schema in a set of staged data files that contain semi-structured data and retrieves the column definitions.Table functions
INITCAPReturns the input string with the first letter of each word in uppercase and the subsequent letters in lowercase.String & binary functions
INSERTReplaces a substring of the specified length, starting at the specified position, with a new string or binary value.String & binary functions
INTEGRATIONReturns a JSON object that specifies the notification integration to use to send a message.Notification functions
INTERPOLATE_BFILL, INTERPOLATE_FFILL, INTERPOLATE_LINEARUpdates rows in a time-series data set to gap-fill missing values based on surrounding values.Window functions
INVOKER_ROLEReturns the name of the account-level role of the object executing the query or NULL if the name of the role is a database role.Context functions
INVOKER_SHAREReturns the name of the share that directly accessed the table or view where the INVOKER_SHARE function is invoked, otherwise the function returns NULL.Context functions
IS [ NOT ] DISTINCT FROMCompares whether two expressions are equal (or not equal).Conditional expression functions
IS [ NOT ] NULLDetermines whether an expression is NULL or is not NULL.Conditional expression functions
IS_*<object_type>*This family of functions serves as Boolean predicates that can be used to determine the data type of a value stored in a VARIANT column.Semi-structured and structured data functions
IS_APPLICATION_ROLE_ACTIVATED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if an application role is activated in the specified context.Context functions
IS_APPLICATION_ROLE_IN_SESSIONVerifies whether the application role is activated in the consumer’s current session.Context functions
IS_ARRAYReturns TRUE if its VARIANT argument contains an ARRAY value.Semi-structured and structured data functions
IS_BINARYReturns TRUE if its VARIANT argument contains a binary string value.Semi-structured and structured data functions
IS_BOOLEANReturns TRUE if its VARIANT argument contains a BOOLEAN value.Semi-structured and structured data functions
IS_CHAR , IS_VARCHARReturns TRUE if its VARIANT argument contains a string value.Semi-structured and structured data functions
IS_CONFIGURATION_SET (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if the specified configuration has a value set, that is, the configuration’s status is DONE.Context functions
IS_DATABASE_ROLE_ACTIVATED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if a database role is activated in the current session.Context functions
IS_DATABASE_ROLE_IN_SESSIONVerifies whether the database role is in the user’s active primary or secondary role hierarchy for the current session or if the specified column contains a database role that is in the user’s active primary or secondary role hierarchy for the current session.Context functions
IS_DATE , IS_DATE_VALUEReturns TRUE if its VARIANT argument contains a DATE value.Semi-structured and structured data functions
IS_DECIMALReturns TRUE if its VARIANT argument contains a fixed-point number or integer value.Semi-structured and structured data functions
IS_DOUBLE , IS_REALReturns TRUE if its VARIANT argument contains a floating-point number, fixed-point number, or integer value.Semi-structured and structured data functions
IS_GRANTED_TO_INVOKER_ROLEReturns TRUE if the role returned by the INVOKER_ROLE function inherits the privileges of the specified role in the argument based on the context in which the function is called.Context functions
IS_GROUP_ACTIVATED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if the role representing an organization user group is activated in a given context.Context functions
IS_GROUP_IMPORTED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if the specified group is an organization user group that was imported into the current account.Context functions
IS_INSTANCE_ROLE_IN_SESSIONVerifies whether the user’s active primary or secondary role hierarchy for the session inherits the specified instance role.Context functions
IS_INTEGERReturns TRUE if its VARIANT argument contains an integer value.Semi-structured and structured data functions
IS_NULL_VALUEReturns TRUE if its VARIANT argument is a JSON null value.Conditional expression functions , Semi-structured and structured data functions
IS_OBJECTReturns TRUE if its VARIANT argument contains an OBJECT value.Semi-structured and structured data functions
IS_ORGANIZATION_USERReturns TRUE if the argument is a Snowflake user who is an organization user.Organization user and organization user group functions
IS_ORGANIZATION_USER_GROUPReturns TRUE if the specified role was created when an administrator added an organization user group to the account.Organization user and organization user group functions
IS_ORGANIZATION_USER_GROUP_IN_SESSIONAssuming a role was imported from an organization user group, verifies whether the role is in the user’s active primary or secondary role hierarchy for the session.Context functions
IS_ROLE_ACTIVATED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if an account role is activated in the current session.Context functions
IS_ROLE_IN_SESSIONVerifies whether the specified account role is in the currently active primary or secondary role hierarchy.Context functions
IS_TIMEVerifies whether a VARIANT argument contains a TIME value.Semi-structured and structured data functions
IS_TIMESTAMP_*Verifies whether a VARIANT argument contains the respective timestamp value.Semi-structured and structured data functions
IS_USER_IMPORTED (SYS_CONTEXT function)Returns the VARCHAR value 'TRUE' if the specified user is an organization user that was imported into the current account.Context functions
J
JAROWINKLER_SIMILARITYComputes the Jaro-Winkler similarity between two input strings.String & binary functions
JSON_EXTRACT_PATH_TEXTParses the first argument as a JSON string and returns the value of the element pointed to by the path in the second argument.Semi-structured and structured data functions
K
KURTOSISReturns the sample excess kurtosis of non-NULL records.Aggregate functions , Window function syntax and usage
L
LAGAccesses data in a previous row in the same result set without having to join the table to itself.Window function syntax and usage
LAST_DAYReturns the last day of the specified date part for a date or timestamp.Date & time functions
LAST_QUERY_IDReturns the ID of a specified query in the current session.Context functions
LAST_SUCCESSFUL_SCHEDULED_TIMEReturns the timestamp representing the scheduled time for the most recent successful evaluation of the alert condition, where no errors occurred when executing the action.Date & time functions
LAST_TRANSACTIONReturns the transaction ID of the last transaction that was either committed or rolled back in the current session.Context functions
LAST_VALUEReturns the last value within an ordered group of values.Window function syntax and usage
LEADAccesses data in a subsequent row in the same result set without having to join the table to itself.Window function syntax and usage
LEASTReturns the smallest value from a list of expressions.Conditional expression functions
LEAST_IGNORE_NULLSReturns the smallest non-NULL value from a list of expressions.Conditional expression functions
LEFTReturns a leftmost substring of its input.String & binary functions
LENGTH, LENReturns the length of an input string or binary value.String & binary functions
[ NOT ] LIKEPerforms a case-sensitive comparison to determine whether a string matches or does not match a specified pattern.String & binary functions
LIKE ALLPerforms a case-sensitive comparison to match a string against all of one or more specified patterns.String & binary functions
LIKE ANYPerforms a case-sensitive comparison to match a string against any of one or more specified patterns.String & binary functions
LISTAGGReturns the concatenated input values, separated by the delimiter string.Aggregate functions , Window function syntax and usage
LISTING_REFRESH_HISTORYReturns the past 14 days of refresh history for a cross-cloud auto-fulfillment listing.Information Schema , Table functions
LNReturns the natural logarithm of a numeric expression.Numeric functions
LOCALTIMEReturns the current time for the system.Context functions
LOCALTIMESTAMPReturns the current timestamp for the system in the local time zone.Context functions
LOGReturns the logarithm of a numeric expression.Numeric functions
LOGIN_HISTORY , LOGIN_HISTORY_BY_USERThe LOGIN_HISTORY family of table functions can be used to query login attempts by Snowflake users along various dimensions.Information Schema , Table functions
LOWERReturns the input string with all characters converted to lowercase.String & binary functions
LPADLeft-pads a string with characters from another string, or left-pads a binary value with bytes from another binary value.String & binary functions
LTRIMRemoves leading characters, including whitespace, from a string.String & binary functions
M
MAP_CATReturns the concatenatation of two MAP values.Semi-structured and structured data functions
MAP_CONTAINS_KEYDetermines whether the specified MAP contains the specified key.Semi-structured and structured data functions
MAP_DELETEReturns a MAP based on an existing MAP with one or more keys removed.Semi-structured and structured data functions
MAP_ENTRIESReturns an ARRAY value of key-value pair objects for each entry in a MAP value.Semi-structured and structured data functions
MAP_INSERTReturns a new MAP consisting of the input MAP with a new key-value pair inserted.Semi-structured and structured data functions
MAP_KEYSReturns the keys in a MAP.Semi-structured and structured data functions
MAP_PICKReturns a new MAP containing the specified key-value pairs from an existing MAP.Semi-structured and structured data functions
MAP_SIZEReturns the size of a MAP.Semi-structured and structured data functions
MATERIALIZED_VIEW_REFRESH_HISTORYThis table function is used for querying the materialized views refresh history for a specified materialized view within a specified date range.Information Schema , Table functions
MAXReturns the maximum value for the records within expr.Aggregate functions , Window functions
MAX_BYFinds the row(s) containing the maximum value for a column and returns the value of another column in that row.Aggregate functions
MD5 , MD5_HEXReturns a 32-character hex-encoded string containing the 128-bit MD5 message digest.String & binary functions
MD5_BINARYReturns a 16-byte BINARY value containing the 128-bit MD5 message digest.String & binary functions
MD5_NUMBER — ObsoletedReturns the 128-bit MD5 message digest interpreted as a signed 128-bit big endian number.String & binary functions
MD5_NUMBER_LOWER64Calculates the 128-bit MD5 message digest, interprets it as a signed 128-bit big endian number, and returns the lower 64 bits of the number as an unsigned integer.String & binary functions
MD5_NUMBER_UPPER64Calculates the 128-bit MD5 message digest, interprets it as a signed 128-bit big endian number, and returns the upper 64 bits of the number as an unsigned integer.String & binary functions
MEDIANDetermines the median of a set of values.Aggregate functions , Window functions
MINReturns the minimum value for the records within expr.Aggregate functions , Window functions
MIN_BYFinds the row(s) containing the minimum value for a column and returns the value of another column in that row.Aggregate functions
MINHASHReturns a MinHash state containing an array of size k constructed by applying k number of different hash functions to the input rows and keeping the minimum of each hash function.Aggregate functions , Window functions
MINHASH_COMBINECombines input MinHash states into a single MinHash output state.Aggregate functions , Window functions
MODReturns the remainder of input expr1 divided by input expr2.Numeric functions
MODEReturns the most frequent value for the values within expr1.Aggregate functions , Window functions
MODEL_MONITOR_DRIFT_METRICGets drift metrics from a model monitor.Model monitor functions
MODEL_MONITOR_PERFORMANCE_METRICGets performance metrics from a model monitor.Model monitor functions
MODEL_MONITOR_STAT_METRICGets count metrics from a model monitor.Model monitor functions
MONTHNAMEReturns the three-letter month name for the specified date or timestamp.Date & time functions
MONTHS_BETWEENReturns the number of months between two DATE or TIMESTAMP values.Date & time functions
N
NETWORK_RULE_REFERENCESReturns a row for each object with which the specified network rule is associated or returns a row for each network rule associated with the specified container.Information Schema , Table functions
NEXT_DAYReturns the date of the first specified day of week (DOW) that occurs after the input date.Date & time functions
NORMALGenerates a normally-distributed pseudo-random floating point number with specified mean and stddev (standard deviation).Data generation functions
NOTIFICATION_HISTORYThis table function can be used to query the history of notifications sent through Snowflake.Information Schema , Table functions
NTH_VALUEReturns the nth value (up to 1000) within an ordered group of values.Window function syntax and usage
NTILEDivides an ordered data set equally into the number of buckets specified by constant_value.Window function syntax and usage
NULLIFReturns NULL if expr1 is equal to expr2, otherwise returns expr1.Conditional expression functions
NULLIFZEROReturns NULL if the argument evaluates to 0; otherwise, returns the argument.Conditional expression functions
NVLIf expr1 is NULL, returns expr2, otherwise returns expr1.Conditional expression functions
NVL2Returns values depending on whether the first input is NULL.Conditional expression functions
O
OBJECT_AGGReturns one OBJECT per group.Aggregate functions , Window functions , Semi-structured and structured data functions
OBJECT_CONSTRUCTReturns an OBJECT constructed from the arguments.Semi-structured and structured data functions
OBJECT_CONSTRUCT_KEEP_NULLReturns an OBJECT constructed from the arguments that retains key-values pairs with NULL values.Semi-structured and structured data functions
OBJECT_DELETEReturns an object containing the contents of the input (that is, source) object with one or more keys removed.Semi-structured and structured data functions
OBJECT_INSERTReturns an OBJECT value consisting of the input OBJECT value with a new key-value pair inserted (or an existing key updated with a new value).Semi-structured and structured data functions
OBJECT_KEYSReturns an array containing the list of keys in the top-most level of the input object.Semi-structured and structured data functions
OBJECT_PICKReturns a new OBJECT containing some of the key-value pairs from an existing object.Semi-structured and structured data functions
OCTET_LENGTHReturns the length of a string or binary value in bytes.String & binary functions
ONLINE_FEATURE_TABLE_REFRESH_HISTORYThis table function returns information about each refresh (completed and running) of online feature tables.Information Schema , Table functions
P
PARSE_DOCUMENT (SNOWFLAKE.CORTEX)Returns the extracted content from a document on a Snowflake stage as a JSON-formatted string.File functions
PARSE_IPReturns a JSON object consisting of all the components from a valid INET (Internet Protocol) or CIDR (Classless Internet Domain Routing) IPv4 or IPv6 string.String & binary functions
PARSE_JSONInterprets an input string as a JSON document, producing a VARIANT value.Semi-structured and structured data functions
PARSE_URLReturns an OBJECT value that consists of all the components (fragment, host, parameters, path, port, query, scheme) in a valid input URL/URI.String & binary functions
PARSE_XMLInterprets an input string as an XML document, producing an OBJECT value.Semi-structured and structured data functions
PERCENT_RANKReturns the relative rank of a value within a group of values, specified as a percentage ranging from 0.0 to 1.0.Window functions
PERCENTILE_CONTReturn a percentile value based on a continuous distribution of the input column (specified in order_by_expr).Aggregate functions , Window functions
PERCENTILE_DISCReturns a percentile value based on a discrete distribution of the input column (specified in order_by_expr).Aggregate functions , Window functions
PIReturns the value of pi as a floating-point value.Numeric functions
PIPE_USAGE_HISTORYThis table function can be used to query the history of data loaded into Snowflake tables using Snowpipe within a specified date range.Information Schema , Table functions
POLICY_CONTEXTSimulates the results of a query based upon the value of one or more context functions, which lets you determine how policies affect query results.Context functions
POLICY_REFERENCESReturns a row for each object that has the specified policy assigned to the object or returns a row for each policy assigned to the specified object.Information Schema , Table functions
POSITIONSearches for the first occurrence of the first argument in the second argument and, if successful, returns the position (1-based) of the first argument in the second argument.String & binary functions
POW, POWERReturns a number (x) raised to the specified power (y).Numeric functions
PREVIOUS_DAYReturns the date of the first specified day of week (DOW) that occurs before the input date.Date & time functions
PROMPTThe PROMPT function constructs a structured OBJECT containing a template string and a list of arguments.Semi-structured and structured data functions
Q
QUERY_ACCELERATION_HISTORYThe QUERY_ACCELERATION_HISTORY function is used for querying the query acceleration service history within a specified date range.Information Schema , Table functions
QUERY_HISTORY , QUERY_HISTORY_BY_*You can use the QUERY_HISTORY family of table functions to query Snowflake query history along various dimensions.Information Schema , Table functions
R
RADIANSConverts degrees to radians.Numeric functions
RANDOMEach call returns a pseudo-random 64-bit integer.Data generation functions
RANDSTRReturns a random string of specified length.Data generation functions
RANKReturns the rank of a value within an ordered group of values.Window functions
RATIO_TO_REPORTReturns the ratio of a value within a group to the sum of the values within the group.Window functions
REDUCEReduces an array to a single value based on the logic in a lambda expression.Semi-structured and structured data functions
[ NOT ] REGEXPPerforms a comparison to determine whether a string matches or does not match a specified pattern.String functions (regular expressions)
REGEXP_COUNTReturns the number of times that a pattern occurs in a string.String functions (regular expressions)
REGEXP_INSTRReturns the position of the specified occurrence of the regular expression pattern in the string subject.String functions (regular expressions)
REGEXP_LIKEPerforms a comparison to determine whether a string matches a specified pattern.String functions (regular expressions)
REGEXP_REPLACEReturns the subject with the specified pattern — or all occurrences of the pattern — either removed or replaced by a replacement string.String functions (regular expressions)
REGEXP_SUBSTRReturns the substring that matches a regular expression within a string.String functions (regular expressions)
REGEXP_SUBSTR_ALLReturns an ARRAY that contains all substrings that match a regular expression within a string.String functions (regular expressions)
REGR_AVGXReturns the average of the independent variable for non-null pairs in a group, where x is the independent variable and y is the dependent variable.Aggregate functions , Window functions
REGR_AVGYReturns the average of the dependent variable for non-null pairs in a group, where x is the independent variable and y is the dependent variable.Aggregate functions , Window functions
REGR_COUNTReturns the number of non-null number pairs in a group.Aggregate functions , Window function syntax and usage
REGR_INTERCEPTReturns the intercept of the univariate linear regression line for non-null pairs in a group.Aggregate functions , Window function syntax and usage
REGR_R2Returns the coefficient of determination for non-null pairs in a group.Aggregate functions , Window function syntax and usage
REGR_SLOPEReturns the slope of the linear regression line for non-null pairs in a group.Aggregate functions , Window function syntax and usage
REGR_SXXReturns REGR_COUNT(y, x) * VAR_POP(x) for non-null pairs.Aggregate functions , Window function syntax and usage
REGR_SXYReturns REGR_COUNT(expr1, expr2) * COVAR_POP(expr1, expr2) for non-null pairs.Aggregate functions , Window function syntax and usage
REGR_SYYReturns REGR_COUNT(y, x) * VAR_POP(y) for non-null pairs.Aggregate functions , Window function syntax and usage
REGR_VALXReturns NULL if the first argument is NULL; otherwise, returns the second argument.Conditional expression functions
REGR_VALYReturns NULL if the second argument is NULL; otherwise, returns the first argument.Conditional expression functions
REPEATBuilds a string by repeating the input for the specified number of times.String & binary functions
REPLACERemoves all occurrences of a specified substring, and optionally replaces them with another substring.String & binary functions
REPLICATION_GROUP_DANGLING_REFERENCESDetects cases where an object that’s referenced in a replication group or failover group isn’t actually replicated to the secondary account.Information Schema , Table functions
REPLICATION_GROUP_REFRESH_HISTORY, REPLICATION_GROUP_REFRESH_HISTORY_ALLYou can use the REPLICATION_GROUP_REFRESH_HISTORY family of table functions to query the replication history for one secondary replication or failover group, or all such groups, within the last 14 days.Information Schema , Table functions
REPLICATION_GROUP_REFRESH_PROGRESS, REPLICATION_GROUP_REFRESH_PROGRESS_BY_JOB, REPLICATION_GROUP_REFRESH_PROGRESS_ALLYou can use the REPLICATION_GROUP_REFRESH_PROGRESS family of table functions to query the status of refresh operations for replication or failover groups.Information Schema , Table functions
REPLICATION_GROUP_USAGE_HISTORYReturns the replication usage history for secondary replication or failover groups within the last 14 days.Information Schema , Table functions
REPLICATION_USAGE_HISTORYThis table function can be used to query the replication history for a specified database within a specified date range.Information Schema , Table functions
REST_EVENT_HISTORYReturns a list of SCIM REST API requests made to Snowflake over a specified time interval.Table functions
RESULT_SCANReturns the result set of a previous command (within 24 hours of when you ran the query) as if the result was a table.Table functions
REVERSEReverses the order of characters in a string, or of bytes in a binary value.String & binary functions
RIGHTReturns a rightmost substring of its input.String & binary functions
[ NOT ] RLIKEPerforms a comparison to determine whether a string matches or does not match a specified pattern.String functions (regular expressions)
ROUNDReturns rounded values for input_expr.Numeric functions
ROW_NUMBERReturns a unique row number for each row within a window partition.Window function syntax and usage
RPADRight-pads a string with characters from another string, or right-pads a binary value with bytes from another binary value.String & binary functions
RTRIMRemoves trailing characters, including whitespace, from a string.String & binary functions
RTRIMMED_LENGTHReturns the length of its argument, minus trailing whitespace, but including leading whitespace.String & binary functions
S
SANITIZE_WEBHOOK_CONTENTRemoves placeholders (for example, the SNOWFLAKE_WEBHOOK_SECRET placeholder, which specifies a secret) from the body of a notification message to be sent.Notification functions
SCHEDULED_TIMEReturns the timestamp representing the scheduled time of the current alert.Date & time functions
SEARCHSearches character data (text) in specified columns from one or more tables, including fields in VARIANT, OBJECT, and ARRAY columns.String & binary functions
SEARCH_IPSearches for valid IPv4 and IPv6 addresses in specified character-string columns from one or more tables, including fields in VARIANT, OBJECT, and ARRAY columns.String & binary functions
SEARCH_OPTIMIZATION_HISTORYThis table function is used for querying the search optimization service maintenance history for a specified table within a specified date range.Information Schema , Table functions
SEARCH_PREVIEW (SNOWFLAKE.CORTEX)Given a Cortex Search service name, and a query, returns a response from the specified service.String & binary functions
SENTIMENT (SNOWFLAKE.CORTEX)Returns an overall sentiment score for the given English-language input text.String & binary functions
SEQ1 / SEQ2 / SEQ4 / SEQ8Returns a sequence of monotonically increasing integers, with wrap-around.Data generation functions
SERVERLESS_ALERT_HISTORYThis table function is used for querying the serverless alert usage history.Information Schema , Table functions
SERVERLESS_TASK_HISTORYThis table function is used for querying the serverless task usage history.Information Schema , Table functions
SET_SYS_CONTEXTSets a value for a specified key in a specified namespace.Context functions
SHA1 , SHA1_HEXReturns a 40-character hex-encoded string containing the 160-bit SHA-1 message digest.String & binary functions
SHA1_BINARYReturns a 20-byte binary containing the 160-bit SHA-1 message digest.String & binary functions
SHA2 , SHA2_HEXReturns a hex-encoded string containing the N-bit SHA-2 message digest, where N is the specified output digest size.String & binary functions
SHA2_BINARYReturns a binary containing the N-bit SHA-2 message digest, where N is the specified output digest size.String & binary functions
SHOW_PYTHON_PACKAGES_DEPENDENCIESReturns a list of the dependencies and their versions for the Python packages that were specified.System functions
SIGNReturns the sign of its argument.Numeric functions
SINComputes the sine of its argument; the argument should be expressed in radians.Numeric functions
SINHComputes the hyperbolic sine of its argument.Numeric functions
SKEWReturns the sample skewness of non-NULL records.Aggregate functions
SOUNDEXReturns a string that contains a phonetic representation of the input string.String & binary functions
SOUNDEX_P123Returns a string that contains a phonetic representation of the input string, and retains the Soundex code number for the second letter when the first and second letters use the same number.String & binary functions
SPACEBuilds a string consisting of the specified number of blank spaces.String & binary functions
<service_name>!SPCS_CANCEL_JOBCancels a Snowpark Container Services job; also referred to as job service.Table functions
<service_name>!SPCS_GET_EVENTSReturns the events that Snowflake collected for the specified service.Table functions
<service_name>!SPCS_GET_LOGSReturns the logs that Snowflake collected from containers of the specified service.Table functions
<service_name>!SPCS_GET_METRICSReturns the metrics that Snowflake collected for the specified service.Table functions
<service_name>!SPCS_WAIT_FORWaits for the Snowpark Container Services service to reach the specified state, with a timeout.Snowpark Container Services functions
SPLITSplits a given string with a given separator and returns the result in an array of strings.String & binary functions
SPLIT_PARTSplits a given string at a specified character and returns the requested part.String & binary functions
SPLIT_TEXT_MARKDOWN_HEADER (SNOWFLAKE.CORTEX)The SPLIT_TEXT_MARKDOWN_HEADER function splits a Markdown-formatted document into structured text chunks based on header levels.String & binary functions
SPLIT_TEXT_RECURSIVE_CHARACTER (SNOWFLAKE.CORTEX)The SPLIT_TEXT_RECURSIVE_CHARACTER function splits a string into shorter stings, recursively, for preprocessing text to be used with text embedding or search indexing functions.String & binary functions
SPLIT_TO_TABLEThis table function splits a string (based on a specified delimiter) and flattens the results into rows.String & binary functions , Table functions
SQRTReturns the square-root of a non-negative numeric expression.Numeric functions
SQUAREReturns the square of a numeric expression (i.e. a numeric expression multiplied by itself).Numeric functions
ST_AREAReturns the area of the Polygon(s) in a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_ASEWKBGiven a value of type GEOGRAPHY or GEOMETRY, return the binary representation of that value in EWKB (extended well-known binary) format.Geospatial functions
ST_ASEWKTGiven a value of type GEOGRAPHY or GEOMETRY, return the text (VARCHAR) representation of that value in EWKT (extended well-known text) format.Geospatial functions
ST_ASGEOJSONGiven a value of type GEOGRAPHY or GEOMETRY, return the GeoJSON representation of that value.Geospatial functions
ST_ASWKB , ST_ASBINARYGiven a value of type GEOGRAPHY or GEOMETRY, return the binary representation of that value in WKB (well-known binary) format.Geospatial functions
ST_ASWKT , ST_ASTEXTGiven a value of type GEOGRAPHY or GEOMETRY, return the text (VARCHAR) representation of that value in WKT (well-known text) format.Geospatial functions
ST_AZIMUTHGiven a Point that represents the origin (the location of the observer) and a specified Point, returns the azimuth in radians.Geospatial functions
ST_BUFFERReturns a GEOMETRY object that represents a MultiPolygon containing the points within a specified distance of the input GEOMETRY object.Geospatial functions
ST_CENTROIDReturns the Point representing the geometric center of a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_COLLECTThere are two forms of ST_COLLECT.Geospatial functions
ST_CONTAINSReturns TRUE if a GEOGRAPHY or GEOMETRY object is completely inside another object of the same type.Geospatial functions
ST_COVEREDBYReturns TRUE if no point in one geospatial object is outside another geospatial object.Geospatial functions
ST_COVERSReturns TRUE if no point in one geospatial object is outside of another geospatial object.Geospatial functions
ST_DIFFERENCEGiven two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the points in the first object that are not in the second object (i.e. the difference between the two objects).Geospatial functions
ST_DIMENSIONGiven a value of type GEOGRAPHY or GEOMETRY, return the “dimension” of the value.Geospatial functions
ST_DISJOINTReturns TRUE if the two GEOGRAPHY objects or the two GEOMETRY objects are disjoint (i.e. do not share any portion of space).Geospatial functions
ST_DISTANCEReturns the minimum great circle distance between two GEOGRAPHY or the minimum Euclidean distance between two GEOMETRY objects.Geospatial functions
ST_DWITHINReturns TRUE if the minimum great circle distance between two points (two GEOGRAPHY objects) is within the specified distance.Geospatial functions
ST_ENDPOINTReturns the last Point in a LineString.Geospatial functions
ST_ENVELOPEReturns the minimum bounding box (a rectangular “envelope”) that encloses a specified GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_GEOGFROMGEOHASHReturns a GEOGRAPHY object for the polygon that represents the boundaries of a geohash.Geospatial functions , Conversion functions
ST_GEOGPOINTFROMGEOHASHReturns a GEOGRAPHY object for the Point that represents the center of a geohash.Geospatial functions , Conversion functions
ST_GEOGRAPHYFROMWKBParses a WKB (well-known binary) or EWKB (extended well-known binary) input and returns a value of type GEOGRAPHY.Geospatial functions , Conversion functions
ST_GEOGRAPHYFROMWKTParses a WKT (well-known text) or EWKT (extended well-known text) input and returns a value of type GEOGRAPHY.Geospatial functions , Conversion functions
ST_GEOHASHReturns the geohash for a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_GEOMETRYFROMWKBParses a WKB (well-known binary) or EWKB (extended well-known binary) input and returns a value of type GEOMETRY.Geospatial functions , Conversion functions
ST_GEOMETRYFROMWKTParses a WKT (well-known text) or EWKT (extended well-known text) input and returns a value of type GEOMETRY.Geospatial functions , Conversion functions
ST_GEOMFROMGEOHASHReturns a GEOMETRY object for the polygon that represents the boundaries of a geohash.Geospatial functions
ST_GEOMPOINTFROMGEOHASHReturns a GEOMETRY object for the point that represents center of a geohash.Geospatial functions
ST_HAUSDORFFDISTANCEReturns the discrete Hausdorff distance between two GEOGRAPHY objects.Geospatial functions
ST_INTERPOLATEGiven an input GEOGRAPHY object, returns an interpolated object that is within a specified tolerance.Geospatial functions
ST_INTERSECTIONGiven two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the shape containing the set of points that are common to both input objects (i.e. the intersection of the two objects).Geospatial functions
ST_INTERSECTION_AGGGiven a GEOGRAPHY column, returns a GEOGRAPHY object that represents the shape containing the combined set of points that are common to the shapes represented by the objects in the column (that is, the intersection of the shapes).Geospatial functions
ST_INTERSECTSReturns TRUE if the two GEOGRAPHY objects or the two GEOMETRY objects intersect (i.e. share any portion of space).Geospatial functions
ST_ISVALIDReturns TRUE if the specified GEOGRAPHY or GEOMETRY object represents a valid shape.Geospatial functions
ST_LENGTHReturns the great circle length of the LineString(s) in a GEOGRAPHY object or the Euclidean length of the LineString(s) in a GEOMETRY object.Geospatial functions
ST_MAKEGEOMPOINT , ST_GEOMPOINTConstructs a GEOMETRY object that represents a Point with the specified longitude and latitude.Geospatial functions
ST_MAKELINEConstructs a GEOGRAPHY or GEOMETRY object that represents a line connecting the points in the input objects.Geospatial functions
ST_MAKEPOINT , ST_POINTConstructs a GEOGRAPHY object that represents a point with the specified longitude and latitude.Geospatial functions
ST_MAKEPOLYGON , ST_POLYGONConstructs a GEOGRAPHY or GEOMETRY object that represents a Polygon without holes.Geospatial functions
ST_MAKEPOLYGONORIENTEDConstructs a GEOGRAPHY object that represents a Polygon without holes.Geospatial functions
ST_NPOINTS , ST_NUMPOINTSReturns the number of points in a GEOGRAPHY or GEOGRAPHY object.Geospatial functions
ST_PERIMETERReturns the length of the perimeter of the polygon(s) in a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_POINTNReturns a Point at a specified index in a LineString.Geospatial functions
ST_SETSRIDReturns a GEOMETRY object that has its SRID (spatial reference system identifier) set to the specified value.Geospatial functions
ST_SIMPLIFYGiven an input GEOGRAPHY or GEOMETRY object that represents a Line or Polygon, returns a simpler approximation of the object.Geospatial functions
ST_SRIDReturns the SRID (spatial reference system identifier) of a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_STARTPOINTReturns the first Point in a LineString.Geospatial functions
ST_SYMDIFFERENCEGiven two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the set of points from both input objects that are not part of the intersection of the objects (i.e. the symmetric difference of the two objects).Geospatial functions
ST_TRANSFORMConverts a GEOMETRY object from one spatial reference system (SRS) to another.Geospatial functions
ST_UNIONGiven two input GEOGRAPHY objects, returns a GEOGRAPHY object that represents the combined set of shapes for both objects (i.e. the union of the two shapes).Geospatial functions
ST_UNION_AGGGiven a GEOGRAPHY column, returns a GEOGRAPHY object that represents the combined set of points that are in at least one of the shapes represented by the objects in the column (that is, the union of the shapes).Geospatial functions
ST_WITHINReturns true if the first geospatial object is fully contained by the second geospatial object.Geospatial functions
ST_XReturns the longitude (X coordinate) of a Point represented by a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_XMAXReturns the maximum longitude (X coordinate) of all points contained in the specified GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_XMINReturns the minimum longitude (X coordinate) of all points contained in the specified GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_YReturns the latitude (Y coordinate) of a Point represented by a GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_YMAXReturns the maximum latitude (Y coordinate) of all points contained in the specified GEOGRAPHY or GEOMETRY object.Geospatial functions
ST_YMINReturns the minimum latitude (Y coordinate) of all points contained in the specified GEOGRAPHY or GEOMETRY object.Geospatial functions
STAGE_DIRECTORY_FILE_REGISTRATION_HISTORYThis table function can be used to query information about the metadata history for a directory table.Information Schema , Table functions
STAGE_STORAGE_USAGE_HISTORYThis table function can be used to query the average daily data storage usage, in bytes, for all the Snowflake stages in your account within a specified date range.Information Schema , Table functions
STARTSWITHReturns true if expr1 starts with expr2.String & binary functions
STDDEV, STDDEV_SAMPReturns the sample standard deviation (square root of sample variance) of non-NULL values.Aggregate functions , Window function syntax and usage
STDDEV_POPReturns the population standard deviation (square root of variance) of non-NULL values.Aggregate functions , Window function syntax and usage
STORAGE_LIFECYCLE_POLICY_HISTORYReturns execution history for storage lifecycle policies in your account within the last 14 days.Table functions
STRIP_NULL_VALUEConverts a JSON null value to a SQL NULL value.Semi-structured and structured data functions
STRTOKTokenizes a given string and returns the requested part.String & binary functions
STRTOK_SPLIT_TO_TABLETokenizes a string with the given set of delimiters and flattens the results into rows.String & binary functions , Table functions
STRTOK_TO_ARRAYTokenizes the given string using the given set of delimiters and returns the tokens as an ARRAY value.String & binary functions , Semi-structured and structured data functions
SUBSTR , SUBSTRINGReturns the portion of the string or binary value from base_expr, starting from the character/byte specified by start_expr, with optionally limited length.String & binary functions
SUMReturns the sum of non-NULL records for expr.Aggregate functions , Window function syntax and usage
SUMMARIZE (SNOWFLAKE.CORTEX)Summarizes the given English-language input text.String & binary functions
SYS_CONTEXTReturns information about the context in which the function is called.Context functions
SYS_CONTEXT (SNOWFLAKE$APPLICATION namespace)Returns information about the context in which a statement is executed within a Snowflake Native App.Context functions
SYS_CONTEXT (SNOWFLAKE$ENVIRONMENT namespace)Returns information about the environment (the client, current account, and current region) in which the function is called.Context functions
SYS_CONTEXT (SNOWFLAKE$ORGANIZATION namespace)Returns information about the current organization.Context functions
SYS_CONTEXT (SNOWFLAKE$ORGANIZATION_SESSION namespace)Returns information about the session in which the function is called and the current organization user.Context functions
SYS_CONTEXT (SNOWFLAKE$SESSION namespace)Returns information about the session in which the function is called.Context functions
SYS_CONTEXT (SNOWFLAKE$SESSION_ATTRIBUTES namespace)Returns a custom session attribute set using SET_SYS_CONTEXT.Context functions
SYSDATEReturns the current timestamp for the system in the UTC time zone.Context functions
SYSTEM$ABORT_SESSIONAborts the specified session.System functions
SYSTEM$ABORT_TRANSACTIONAborts the specified transaction, if it is running.System functions
SYSTEM$ACTIVATE_CMK_INFOActivates Tri-Secret Secure in your account, optionally with private connectivity, by using the customer-managed key (CMK) information that you registered for your account.System functions
SYSTEM$ACTIVATE_CMK_INFO_POSTGRESActivates Snowflake Postgres Tri-Secret Secure in your account by using the CMK (customer-managed key) information that you registered for your account.System functions
SYSTEM$ADD_EVENT (for Snowflake Scripting)Add an event for trace.System functions
SYSTEM$ADD_REFERENCECalled by a Snowflake Native App to associate a consumer reference string to a reference definition.System functions
SYSTEM$ALLOWLISTReturns host names and port numbers to add to your firewall’s allowed list so that you can access Snowflake from behind your firewall.System functions
SYSTEM$ALLOWLIST_PRIVATELINKReturns host names and port numbers for AWS PrivateLink, Azure Private Link, and Google Cloud Private Service Connect deployments to add to your firewall’s allowed list so that you can access Snowflake from behind your firewall.System functions
SYSTEM$APP_COMPATIBILITY_CHECKReturns the Snowflake edition of the consumer account where an app is installed.System functions
SYSTEM$APPLICATION_GET_LOG_LEVELReturns the log level for the specified object.System functions
SYSTEM$APPLICATION_GET_METRIC_LEVELReturns the metric level for the specified object.System functions
SYSTEM$APPLICATION_GET_TRACE_LEVELReturns the trace level for the specified object.System functions
SYSTEM$AUTHORIZE_PRIVATELINKEnables private connectivity to the Snowflake service for the current account.System functions
SYSTEM$AUTHORIZE_STAGE_PRIVATELINK_ACCESSAuthorizes Snowflake to access the private endpoint for Azure private endpoints for internal stages and Google Private Service Connect endpoints for internal stages for the current account.System functions
SYSTEM$AUTO_REFRESH_STATUSReturns the automated refresh status for an externally managed Iceberg table.System functions
SYSTEM$BEGIN_DEBUG_APPLICATIONEnables session debug mode for a Snowflake Native App.System functions
SYSTEM$BEHAVIOR_CHANGE_BUNDLE_STATUSReturns the status of the specified behavior change release bundle for the current account.System functions
SYSTEM$BLOCK_INTERNAL_STAGES_PUBLIC_ACCESSPrevents all public traffic from accessing the internal stage of the current Snowflake account on Microsoft Azure.System functions
SYSTEM$BLOCK_INTERNAL_STAGES_PUBLIC_ACCESS_WITH_EXCEPTIONPrevents public traffic from accessing the internal stage of the current Snowflake account on Microsoft Azure, while allowing access from specified IP addresses or CIDR blocks.System functions
SYSTEM$CANCEL_ALL_QUERIESCancels all active/running queries in the specified session.System functions
SYSTEM$CANCEL_QUERYCancels the specified query (or statement) if it is currently active/running.System functions
SYSTEM$CATALOG_LINK_STATUSReturns the link status for a specified catalog-linked database.System functions
SYSTEM$CKE_HASH_FUNCTIONAnalyzes Cortex Knowledge Extensions (CKE) usage by mapping hashedDocumentIds back to your original document primary keys in the Cortex Search Service.System functions
SYSTEM$CLEANUP_DATABASE_ROLE_GRANTSRevokes privileges on dropped objects from the share and grants the database role to the share.System functions
SYSTEM$CLIENT_VERSION_INFOReturns version information for Snowflake clients and drivers.System functions
SYSTEM$CLIENT_VULNERABILITY_INFOReturns details about common vulnerabilities and exposures (CVE) fixes and related vulnerabilities for Snowflake clients and drivers.System functions
SYSTEM$CLUSTERING_DEPTHComputes the average depth of the table according to the specified columns (or the clustering key defined for the table).System functions
SYSTEM$CLUSTERING_INFORMATIONReturns clustering information, including average clustering depth, for a table based on one or more columns in the table.System functions
SYSTEM$CLUSTERING_RATIO — DeprecatedCalculates the clustering ratio for a table, based on one or more columns in the table.System functions
SYSTEM$COMMIT_MOVE_ORGANIZATION_ACCOUNTFinalizes the process of moving an organization account from one region to another.System functions
SYSTEM$CONVERT_PIPES_SQS_TO_SNSConvert pipes using Amazon SQS (Simple Queue Service) notifications to the Amazon Simple Notification Service (SNS) service for an S3 bucket.System functions
SYSTEM$CREATE_BILLING_EVENTCreates a billable event that tracks consumer usage of an installed monetized application.System functions
SYSTEM$CREATE_BILLING_EVENTSCreates multiple billable events that track consumer usage of installed monetized applications.System functions
SYSTEM$CURRENT_USER_TASK_NAMEReturns the name of the task currently executing when invoked from the statement or stored procedure defined by the task.System functions
SYSTEM$DATA_METRIC_SCANReturns the rows identified by a data quality metric as containing data that fails a data quality check.System functions , Table functions
SYSTEM$DATABASE_REFRESH_HISTORY — DeprecatedReturns a JSON object showing the refresh history for a secondary database.System functions
SYSTEM$DATABASE_REFRESH_PROGRESS , SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB — DeprecatedThe SYSTEM$DATABASE_REFRESH_PROGRESS family of functions can be used to query the status of a database refresh along various dimensions.System functions
SYSTEM$DEACTIVATE_CMK_INFODe-activates Tri-Secret Secure in your account.System functions
SYSTEM$DECODE_PATReturns information about a programmatic access token, given the secret for the token.System functions
SYSTEM$DEPROVISION_PRIVATELINK_ENDPOINTDeprovisions a private connectivity endpoint in the Snowflake VPC or VNet to prevent Snowflake from connecting to an external service by using private connectivity.System functions
SYSTEM$DEPROVISION_PRIVATELINK_ENDPOINT_TSSDeprovisions a private connectivity endpoint in the Snowflake VPC or VNet to prevent Snowflake from connecting to an external key management service (KMS) resource using private connectivity.System functions
SYSTEM$DEREGISTER_CMK_INFOCancels registration of your currently-registered customer-managed key (CMK) for use with Tri-Secret Secure.System functions
SYSTEM$DEREGISTER_CMK_INFO_POSTGRESCancels registration of your currently-registered customer-managed key (CMK) for use with Snowflake Postgres Tri-Secret Secure.System functions
SYSTEM$DESC_ICEBERG_ACCESS_IDENTITYReturns information about the Snowflake service principal for a specified external cloud provider in an account.System functions
SYSTEM$DISABLE_BEHAVIOR_CHANGE_BUNDLEDisables the behavior changes included in the specified behavior change release bundle for the current account.System functions
SYSTEM$DISABLE_DATABASE_REPLICATIONDisable replication for a primary database and any secondary databases linked to it.System functions
SYSTEM$DISABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNTDisables Cross-Cloud Auto-Fulfillment on an account.System functions
SYSTEM$DISABLE_PREVIEW_ACCESSDisables access to open preview and private preview features.System functions
SYSTEM$DISABLE_PRIVATELINK_ACCESS_ONLYUnblocks connections for inbound network traffic that are routed over the public internet.System functions
SYSTEM$ENABLE_BEHAVIOR_CHANGE_BUNDLEEnables behavior changes included in the specified behavior change release bundle for the current account.System functions
SYSTEM$ENABLE_GLOBAL_DATA_SHARING_FOR_ACCOUNTEnables Cross-Cloud Auto-Fulfillment on an account.System functions
SYSTEM$ENABLE_PREVIEW_ACCESSEnables access to open preview features.System functions
SYSTEM$ENCODE_CKE_PRIMARY_KEYTakes one or more primary key columns from a Cortex Knowledge Extensions (CKE) document and converts them into an encoded representation.System functions
SYSTEM$END_DEBUG_APPLICATIONDisables session debug mode for a Snowflake Native App.System functions
SYSTEM$ENFORCE_PRIVATELINK_ACCESS_ONLYEnforces the behavior that successful connections to your Snowflake account use only your private endpoints.System functions
SYSTEM$ESTIMATE_AUTOMATIC_CLUSTERING_COSTSReturns estimated costs associated with enabling Automatic Clustering for a table.System functions
SYSTEM$ESTIMATE_QUERY_ACCELERATIONFor a previously executed query, this function returns a JSON object that specifies if the query is eligible to benefit from the query acceleration service.System functions
SYSTEM$ESTIMATE_SEARCH_OPTIMIZATION_COSTSReturns the estimated costs of adding search optimization to a given table and configuring specific columns for search optimization.System functions
SYSTEM$EVALUATE_DATA_QUALITY_EXPECTATIONSReturns the expectations for associations between data metric functions (DMFs) and a table, including whether an expectation is currently violated.System functions , Table functions
SYSTEM$EXPLAIN_JSON_TO_TEXTThis function converts EXPLAIN output from JSON to formatted text.System functions
SYSTEM$EXPLAIN_PLAN_JSONGiven the text of a SQL statement, this function generates the EXPLAIN plan in JSON.System functions
SYSTEM$EXPORT_TDS_FROM_SEMANTIC_VIEWReturns a semantic view in Tableau Data Source (TDS) format.System functions
SYSTEM$EXTERNAL_TABLE_PIPE_STATUSRetrieves a JSON representation of the current refresh status for the internal (hidden) pipe object associated with an external table.System functions
SYSTEM$FINISH_OAUTH_FLOWSets the OAUTH_REFRESH_TOKEN parameter value of the secret passed as an argument in the SYSTEM$START_OAUTH_FLOW call that began the OAuth flow.System functions
SYSTEM$GENERATE_SAML_CSRGenerates a certificate signing request (CSR) with the subject set to the subject of the certificate stored in the SAML2 integration and can specify the DN to be used in the CSR.System functions
SYSTEM$GENERATE_SCIM_ACCESS_TOKENReturns a new SCIM access token that is valid for six months.System functions
SYSTEM$GET_ALL_DEFAULT_COLUMNS_OVERRIDESReturns the list of columns that were set by previous calls to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND and SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT.System functions
SYSTEM$GET_ALL_REFERENCESIterates through all associations for a reference and returns information about the associations.System functions
SYSTEM$GET_AWS_SNS_IAM_POLICYReturns an AWS IAM policy statement that must be added to the Amazon SNS topic policy in order to grant the Amazon SQS messaging queue created by Snowflake to subscribe to the topic.System functions
SYSTEM$GET_CATALOG_LINKED_DATABASE_CONFIGReturns the configuration parameters set on the specified catalog-linked database.System functions
SYSTEM$GET_CLASSIFICATION_RESULTReturns the classification result of the specified object.System functions
SYSTEM$GET_CMK_AKV_CONSENT_URLReturns a consent URL to the Azure Key Vault account related to customer-managed keys.System functions
SYSTEM$GET_CMK_CONFIGReturns configuration information for use with customer-managed keys (CMKs) and Tri-Secret Secure.System functions
SYSTEM$GET_CMK_CONFIG_POSTGRESReturns configuration information for use with customer-managed keys (CMKs) and Snowflake Postgres Tri-Secret Secure.System functions
SYSTEM$GET_CMK_INFOReturns the status of your customer-managed key (CMK) for use with Tri-Secret Secure.System functions
SYSTEM$GET_CMK_INFO_POSTGRESReturns the status of your customer-managed key (CMK) for use with Snowflake Postgres Tri-Secret Secure.System functions
SYSTEM$GET_CMK_KMS_KEY_POLICYReturns an ARRAY containing a snippet of the AWS Key Management Service policy information related to customer-managed keys.System functions
SYSTEM$GET_COMPUTE_POOL_PENDING_MAINTENANCERetrieves information about pending Snowflake maintenance actions for compute pools in the current account.System functions
SYSTEM$GET_DBT_LOGReturns logs for the specified run for a dbt Projects on Snowflake.System functions
SYSTEM$GET_DEBUG_STATUSReturns the session debug mode status of the current session.System functions
SYSTEM$GET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMANDReturns the list of columns that were set by a previous call to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND.System functions
SYSTEM$GET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECTReturns the list of columns that were set by a previous call to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT for the specified Snowflake view (for example, for a specific ACCOUNT_USAGE view or INFORMATION_SCHEMA view).System functions
SYSTEM$GET_DIRECTORY_TABLE_STATUSReturns a list of records that contain the directory table consistency status for stages in your account.System functions
SYSTEM$GET_GCP_KMS_CMK_GRANT_ACCESS_CMDReturns a Google Cloud gcloud command to obtain policy information for the Google Cloud Key Management Service for use with customer-managed keys.System functions
SYSTEM$GET_HASH_FOR_APPLICATIONReturns the hash value for a Snowflake Native App or query ID.System functions
SYSTEM$GET_ICEBERG_TABLE_INFORMATIONReturns the location of the root metadata file and status of the latest snapshot for an Apache Iceberg™ table.System functions
SYSTEM$GET_INSTANCE_FAMILY_PLACEMENT_GROUPSReturns the list of placement groups supported for the specified instance family for Snowpark Container Services compute pool nodes.System functions
SYSTEM$GET_LOGIN_FAILURE_DETAILSReturns a JSON object that represents an unsuccessful login attempt associated with External OAuth, SAML, or key pair authentication.System functions
SYSTEM$GET_PREDECESSOR_RETURN_VALUERetrieves the return value for the predecessor task in a task graph.System functions
SYSTEM$GET_PREVIEW_ACCESS_STATUSDetermine if access to all preview features is enabled or disabled.System functions
SYSTEM$GET_PRIVATELINKVerifies whether your current account is authorized for private connectivity to the Snowflake service.System functions
SYSTEM$GET_PRIVATELINK_AUTHORIZED_ENDPOINTSReturns a list of the authorized endpoints for your current account to use with private connectivity to the Snowflake service.System functions
SYSTEM$GET_PRIVATELINK_CONFIGReturns a JSON representation of the Snowflake account information necessary to facilitate the self-service configuration of private connectivity to the Snowflake service or Snowflake internal stages.System functions
SYSTEM$GET_PRIVATELINK_ENDPOINT_REGISTRATIONSReturns the registered private endpoints that can route your connection to the Snowflake service.System functions
SYSTEM$GET_PRIVATELINK_ENDPOINTS_INFOReturns the status of all private connectivity endpoints that you provision.System functions
SYSTEM$GET_PURCHASE_ATTRIBUTESIdentifies the behavior of a listing at runtime.System functions
SYSTEM$GET_REFERENCED_OBJECT_ID_HASHReturns the hash of the entity ID of the consumer object.System functions
SYSTEM$GET_RESULTSET_STATUSReturns the status of a RESULTSET in a Snowflake Scripting stored procedure.System functions
SYSTEM$GET_SERVICE_DNS_DOMAINGiven a schema name, returns that schema’s DNS namespace hash as a string.System functions
SYSTEM$GET_SERVICE_LOGSRetrieves local logs from a Snowpark Container Services service container.System functions
SYSTEM$GET_SERVICE_STATUS — DeprecatedRetrieves the status of a Snowpark Container Services service.System functions
SYSTEM$GET_SNOWFLAKE_EGRESS_IP_RANGESReturns a list of egress IP address ranges (as Classless Inter-Domain Routing (CIDR) IP addresses) that you can use to represent Snowflake in a server’s IP allowlist.System functions
SYSTEM$GET_SNOWFLAKE_PLATFORM_INFOReturns platform information for the cloud provider that hosts your Snowflake account.System functions
SYSTEM$GET_STAGE_PRIVATELINK_AUTHORIZED_ENDPOINTSReturns the list of private connectivity sources (Azure private endpoints or Google Cloud VPC networks) that have been authorized to access the internal stage of the current account.System functions
SYSTEM$GET_TAGReturns the tag value associated with the specified Snowflake object or column.System functions
SYSTEM$GET_TAG_ALLOWED_VALUESReturns a comma-separated list of string values that can be set on a supported object, or NULL to indicate the tag key does not have any specified string values and accepts all possible string values.System functions
SYSTEM$GET_TAG_ON_CURRENT_COLUMNReturns the tag string value assigned to the column based upon the specified tag or NULL if a tag is not assigned to the specified column.System functions
SYSTEM$GET_TAG_ON_CURRENT_TABLEReturns the tag string value assigned to the table based upon the specified tag or NULL if a tag is not assigned to the specified table.System functions
SYSTEM$GET_TASK_GRAPH_CONFIGReturns information from a task graph configuration.System functions
SYSTEM$GLOBAL_ACCOUNT_SET_PARAMETEREnables replication and failover features for a specified account in an organization.System functions
SYSTEM$HOLD_PRIVILEGE_ON_ACCOUNTIndicates if a privilege has been granted to a Snowflake Native App.System functions
SYSTEM$INITIATE_MOVE_ORGANIZATION_ACCOUNTStarts the process of moving an organization account to a new region.System functions
SYSTEM$INTERNAL_STAGES_PUBLIC_ACCESS_STATUSChecks to see whether public IP addresses are allowed to access the internal stage of the current Snowflake account on Microsoft Azure.System functions
SYSTEM$IS_APPLICATION_ALL_MANDATORY_TELEMETRY_EVENT_DEFINITIONS_ENABLEDIndicates that the AUTHORIZE_TELEMETRY_EVENT_SHARING property has been set on the app.System functions
SYSTEM$IS_APPLICATION_AUTHORIZED_FOR_TELEMETRY_EVENT_SHARINGIndicates that the AUTHORIZE_TELEMETRY_EVENT_SHARING has been set on the app.System functions
SYSTEM$IS_APPLICATION_INSTALLED_FROM_SAME_ACCOUNTShows if an app is installed on the same account as the application package it is based on.System functions
SYSTEM$IS_APPLICATION_SHARING_EVENTS_WITH_PROVIDERShows if event sharing is enabled.System functions
SYSTEM$IS_GLOBAL_DATA_SHARING_ENABLED_FOR_ACCOUNTSpecifies whether Cross-Cloud Auto-Fulfillment is enabled or disabled on an account.System functions
SYSTEM$IS_LISTING_PURCHASEDReturns TRUE if the consumer account querying data has purchased the listing, otherwise returns FALSE.System functions
SYSTEM$IS_LISTING_TRIALLimits the functionality of a Snowflake Native App based on whether a consumer is trialing the application as part of a Limited trial listings or has access to the full data product.System functions
SYSTEM$LAST_CHANGE_COMMIT_TIMEReturns a token that can be used to detect whether a database table or view changed between two calls to the function.System functions
SYSTEM$LINK_ACCOUNT_OBJECTS_BY_NAMEAdds a global identifier to account objects in the target (current) account that were created using scripts and that match objects with the same names in the source account.System functions
SYSTEM$LINK_ORGANIZATION_USERLinks an organization user with a user that already exists in the regular account.System functions
SYSTEM$LINK_ORGANIZATION_USER_GROUPLinks an organization user group with an access control role that already exists in the regular account.System functions
SYSTEM$LIST_APPLICATION_RESTRICTED_FEATURESReturns a JSON object containing a list of restricted features that the consumer has allowed a Snowflake Native App to use.System functions
SYSTEM$LIST_ICEBERG_TABLES_FROM_CATALOGLists tables in a remote Apache Iceberg™ REST catalog (including Snowflake Open Catalog).System functions
SYSTEM$LIST_NAMESPACES_FROM_CATALOGLists the namespaces in a remote Apache Iceberg™ REST catalog (including Snowflake Open Catalog).System functions
SYSTEM$LOCATE_DBT_ARCHIVEReturns the URL from which you can retrieve zipped dbt run artifacts for a specified dbt project.System functions
SYSTEM$LOCATE_DBT_ARTIFACTSReturns the location of artifacts from a specified dbt Project run (for example, manifest.json).System functions
SYSTEM$LOG, SYSTEM$LOG_<level> (for Snowflake Scripting)Logs a message at the specified severity level.System functions
SYSTEM$MIGRATE_SAML_IDP_REGISTRATIONMigrates an existing SAML identity provider (i.e. IdP) configuration as defined by the account parameter SAML_IDENTITY_PROVIDER to a security integration.System functions
SYSTEM$OPT_IN_INTERNAL_STAGE_NETWORK_LOGSStarts record collection of network access attempts to internal stage locations for this account.System functions
SYSTEM$OPT_OUT_INTERNAL_STAGE_NETWORK_LOGSStops record collection of network access attempts to internal stage locations for this account.System functions
SYSTEM$OPT_OUT_MALICIOUS_IP_PROTECTION_BY_CATEGORYDisables Malicious IP Protection for one or more curated IP categories in the current account.System functions
SYSTEM$PIPE_FORCE_RESUMEForces a pipe paused using ALTER PIPE to resume.System functions
SYSTEM$PIPE_REBINDING_WITH_NOTIFICATION_CHANNELRetries the notification channel binding process when a replicated pipe has not been successfully bound to a notification channel during replication time.System functions
SYSTEM$PIPE_STATUSRetrieves a JSON representation of the current status of a pipe.System functions
SYSTEM$PROVISION_PRIVATELINK_ENDPOINTProvisions a private connectivity endpoint in the Snowflake VPC or VNet to enable Snowflake to connect to an external service by using private connectivity.System functions
SYSTEM$PROVISION_PRIVATELINK_ENDPOINT_TSSProvisions a private connectivity endpoint in the Snowflake VPC or VNet to enable Snowflake to connect to a key management service (KMS) by using private connectivity.System functions
SYSTEM$QUERY_REFERENCEReturns a query reference that you can pass to a stored procedure.System functions
SYSTEM$READ_YAML_FROM_SEMANTIC_VIEWReturns the specification of a semantic model (in YAML format) for a semantic view.System functions
SYSTEM$REFERENCEReturns a reference to an object (a table, view, or function).System functions
SYSTEM$REGISTER_CMK_INFORegisters your customer-managed key (CMK) for use with Tri-Secret Secure.System functions
SYSTEM$REGISTER_CMK_INFO_POSTGRESRegisters your customer-managed key (CMK) for use with Snowflake Postgres Tri-Secret Secure.System functions
SYSTEM$REGISTER_PRIVATELINK_ENDPOINTRegisters a private connectivity endpoint to route your connection to the Snowflake service.System functions
SYSTEM$REGISTRY_LIST_IMAGES — DeprecatedLists images in an image repository.System functions
SYSTEM$REMOVE_ALL_REFERENCESDeletes all associations to the reference.System functions
SYSTEM$REMOVE_REFERENCERemove an association from the reference to an object in the consumer account and returns a unique system-generated alias for the reference.System functions
SYSTEM$REPORT_HEALTH_STATUSSends application health information from a consumer app to the provider account.System functions
SYSTEM$RESOLVE_PYTHON_PACKAGESReturns a list of the resolved dependencies and their versions for the Python packages that were specified.System functions
SYSTEM$RESTORE_PRIVATELINK_ENDPOINTRestores a private connectivity endpoint in the Snowflake VPC or VNet to enable Snowflake to connect to an external service using private connectivity.System functions
SYSTEM$RESTORE_PRIVATELINK_ENDPOINT_TSSRestores a private connectivity endpoint in the Snowflake VPC or VNet to enable Snowflake to connect to an external key management service (KMS) resource by using private connectivity.System functions
SYSTEM$REVOKE_PRIVATELINKDisables private connectivity to the Snowflake service for the current account.System functions
SYSTEM$REVOKE_STAGE_PRIVATELINK_ACCESSRevokes the authorization for Snowflake to access the private endpoint for Azure private endpoints for internal stages and Google Private Service Connect endpoints for internal stages for the current account.System functions
SYSTEM$SAP_BDC_LIST_SHARESLists Data Products shared by SAP® Business Data Cloud with the enrolled catalog integration.System functions
SYSTEM$SCHEDULE_ASYNC_REPLICATION_GROUP_REFRESHStarts a refresh operation for a replication group or a failover group, in the background.System functions
SYSTEM$SEND_NOTIFICATIONS_TO_CATALOGSends a notification to Snowflake Open Catalog to update Snowflake-managed Apache Iceberg™ tables in Open Catalog with the latest table changes, and returns whether the notification was sent successfully along with an error code and error message for the failure, if applicable.System functions
SYSTEM$SET_APPLICATION_RESTRICTED_FEATURE_ACCESSEnables a restricted feature for a Snowflake Native App.System functions
SYSTEM$SET_CATALOG_INTEGRATIONReplaces the catalog integration associated with an externally managed Apache Iceberg™ table.System functions
SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMANDControls the columns that should be returned when the specified SHOW <objects> command is executed.System functions
SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECTControls the columns that should be returned when you select all columns (SELECT *) from the specified Snowflake view (for example, from a specific ACCOUNT_USAGE view or INFORMATION_SCHEMA view).System functions
SYSTEM$SET_EVENT_SHARING_ACCOUNT_FOR_REGIONSets the event account for a region.System functions
SYSTEM$SET_PRIVATELINK_ENDPOINT_HOSTNAMEModifies only the host name of an existing private connectivity endpoint.System functions
SYSTEM$SET_REFERENCECalled by a Snowflake Native App to associate a consumer reference string to a reference definition.System functions
SYSTEM$SET_RETURN_VALUEExplicitly sets the return value for a task.System functions
SYSTEM$SET_ROW_TIMESTAMP_ON_ALL_SUPPORTED_TABLESUse this system function to bulk enable row timestamps on existing tables.System functions
SYSTEM$SET_SPAN_ATTRIBUTES (for Snowflake Scripting)Sets attribute name and value associated with a span containing trace events.System functions
SYSTEM$SHOW_ACTIVE_BEHAVIOR_CHANGE_BUNDLESReturns an array of the currently available behavior change release bundles, the default state of each bundle, and the actual state of the bundle for the current account.System functions
SYSTEM$SHOW_BUDGETS_FOR_RESOURCEReturns a string containing a list of the budgets that track a specified resource (for example, a table or a schema).System functions
SYSTEM$SHOW_BUDGETS_IN_ACCOUNTReturns the budgets in the account for which you have access privileges.System functions
SYSTEM$SHOW_EVENT_SHARING_ACCOUNTSShows event accounts in a provider organization.System functions
SYSTEM$SHOW_MOVE_ORGANIZATION_ACCOUNT_STATUSReturns the status of an attempt to move an organization account.System functions
SYSTEM$SHOW_OAUTH_CLIENT_SECRETSReturns the client secrets in a string.System functions
SYSTEM$SHOW_SENSITIVE_DATA_MONITORED_ENTITIESReturns a JSON array of databases or schemas that are associated with a classification profile, which indicates that objects in these entities are monitored by sensitive data classification.System functions
SYSTEM$SNOWPIPE_STREAMING_UPDATE_CHANNEL_OFFSET_TOKENUpdates the offset token for a particular channel used by Snowpipe Streaming with a new offset token.System functions
SYSTEM$START_OAUTH_FLOWInitiates the OAUTH client flow, returning a URL you use in a browser to complete the OAuth consent process.System functions
SYSTEM$START_USER_EMAIL_VERIFICATIONStarts the email verification process for a user.System functions
SYSTEM$STREAM_BACKLOGReturns the set of table versions between the current offset for a specified stream and the current timestamp.Table functions , System functions
SYSTEM$STREAM_GET_TABLE_TIMESTAMPReturns the timestamp in nanoseconds of the latest table version at or before the current offset for the specified stream.System functions
SYSTEM$STREAM_HAS_DATAIndicates whether a specified stream contains change data capture (CDC) records.System functions
SYSTEM$SUPPORTED_DBT_VERSIONSReturns a JSON array containing the versions that Snowflake supports for dbt Projects.System functions
SYSTEM$TASK_DEPENDENTS_ENABLERecursively resumes a specified task and all its dependent tasks.System functions
SYSTEM$TASK_RUNTIME_INFOReturns information about the current task run.System functions
SYSTEM$TRIGGER_LISTING_REFRESHTriggers a one-time, on-demand data refresh for a provider’s databases or listings, accessible to all consumers.System functions
SYSTEM$TYPEOFReturns a string representing the SQL data type associated with an expression.System functions
SYSTEM$UNBLOCK_INTERNAL_STAGES_PUBLIC_ACCESSAllows traffic from public IP addresses to access the internal stage of the current Snowflake account on Microsoft Azure.System functions
SYSTEM$UNLINK_ORGANIZATION_USERUnlinks a user object from an organization user so it can be managed as a local user going forward.System functions
SYSTEM$UNLINK_ORGANIZATION_USER_GROUPUnlinks an access control role from an organization user group so it can be managed as a local role going forward.System functions
SYSTEM$UNREGISTER_PRIVATELINK_ENDPOINTUnregisters a private connectivity endpoint to route your connection to the Snowflake service.System functions
SYSTEM$UNSET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMANDClears the list of columns specified by a previous call to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SHOW_COMMAND for a type of object.System functions
SYSTEM$UNSET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECTClears the list of columns specified by a previous call to SYSTEM$SET_DEFAULT_COLUMNS_OVERRIDE_FOR_SYSTEM_OBJECT for the specified Snowflake view (for example, for a specific ACCOUNT_USAGE view or INFORMATION_SCHEMA view).System functions
SYSTEM$UNSET_EVENT_SHARING_ACCOUNT_FOR_REGIONUnsets the events account for a region.System functions
SYSTEM$USER_TASK_CANCEL_ONGOING_EXECUTIONSCancels a run of the specified task that the system has already started to process (that is, a run with an EXECUTING state in the TASK_HISTORY output).System functions
SYSTEM$VALIDATE_STORAGE_INTEGRATIONValidates the configuration for a specified storage integration.System functions
SYSTEM$VERIFY_CATALOG_INTEGRATIONVerifies the configuration for a specified catalog integration for Apache Iceberg™ REST.System functions
SYSTEM$VERIFY_CMK_INFOVerifies your customer-managed key (CMK) configuration and returns a message about the registered CMK.System functions
SYSTEM$VERIFY_CMK_INFO_POSTGRESVerifies your customer-managed key (CMK) configuration for Snowflake Postgres Tri-Secret Secure and returns a message about the registered CMK.System functions
SYSTEM$VERIFY_EXTERNAL_OAUTH_TOKENDetermines whether your External OAuth access token is valid or has expired and needs to be regenerated.System functions
SYSTEM$VERIFY_EXTERNAL_VOLUMEVerifies the configuration for a specified external volume.System functions
SYSTEM$WAITWaits for the specified amount of time before proceeding.System functions
SYSTEM$WAIT_FOR_SERVICESWaits for one or more Snowpark Container Services services to reach the READY state (or becomes upgraded) before returning.System functions
SYSTEM$WHITELIST — DeprecatedReturns hostnames and port numbers to add to your firewall’s allowed list so that you can access Snowflake from behind your firewall.System functions
SYSTEM$WHITELIST_PRIVATELINK — DeprecatedReturns hostnames and port numbers for AWS PrivateLink, Azure Private Link, and Google Cloud Private Service Connect deployments to add to your firewall’s allowed list so that you can access Snowflake from behind your firewall.System functions
SYSTIMESTAMPReturns the current timestamp for the system.Context functions
T
TAG_REFERENCESReturns a table in which each row displays an association between a tag and value.Information Schema , Table functions
TAG_REFERENCES_ALL_COLUMNSReturns a table in which each row displays the tag name and tag value assigned to a specific column.Information Schema , Table functions
TAG_REFERENCES_WITH_LINEAGEReturns a table in which each row displays an association between the specified tag and the Snowflake object to which the tag is associated.Account Usage table functions , Table functions
TANComputes the tangent of its argument; the argument should be expressed in radians.Numeric functions
TANHComputes the hyperbolic tangent of its argument.Numeric functions
TASK_DEPENDENTSThis table function returns the list of child tasks for a given root task in a task graph.Information Schema , Table functions
TASK_HISTORYYou can use this table function to query the history of task usage within a specified date range.Information Schema , Table functions
TEXT_HTMLReturns a JSON object that specifies the HTML message to use for a notification.Notification functions
TEXT_PLAINReturns a JSON object that specifies the plain text message to use for a notification.Notification functions
TIME_FROM_PARTSCreates a time from individual numeric components.Date & time functions
TIME_SLICECalculates the beginning or end of a “slice” of time, where the length of the slice is a multiple of a standard unit of time (minute, hour, day, etc.).Date & time functions
TIMEADDAdds the specified value for the specified date or time part to a date, time, or timestamp.Date & time functions
TIMEDIFFCalculates the difference between two date, time, or timestamp expressions based on the specified date or time part.Date & time functions
TIMESTAMP_FROM_PARTSCreates a timestamp from individual numeric components.Date & time functions
TIMESTAMPADDAdds the specified value for the specified date or time part to a date, time, or timestamp.Date & time functions
TIMESTAMPDIFFCalculates the difference between two date, time, or timestamp expressions based on the specified date or time part.Date & time functions
TO_ARRAYConverts the input expression to an ARRAY value.Conversion functions , Semi-structured and structured data functions
TO_BINARYConverts the input expression to a binary value.Conversion functions
TO_BOOLEANConverts the input text or numeric expression to a BOOLEAN value.Conversion functions
TO_CHAR , TO_VARCHARConverts the input expression to a string.Conversion functions
TO_DATE , DATEConverts an input expression to a date.Conversion functions , Date & time functions
TO_DECFLOATConverts an expression to a decimal floating-point number (DECFLOAT).Conversion functions
TO_DECIMAL , TO_NUMBER , TO_NUMERICConverts an input expression to a fixed-point number.Conversion functions
TO_DOUBLEConverts an expression to a double-precision floating-point number.Conversion functions
TO_FILEConstructs a value of type FILE from a file location or from metadata.File functions
TO_GEOGRAPHYParses an input and returns a value of type GEOGRAPHY.Geospatial functions , Conversion functions
TO_GEOMETRYParses an input and returns a value of type GEOMETRY.Geospatial functions , Conversion functions
TO_JSONConverts a VARIANT value to a string containing the JSON representation of the value.Conversion functions , Semi-structured and structured data functions
TO_OBJECTConverts the input value to an OBJECT.Conversion functions , Semi-structured and structured data functions
TO_QUERYReturns a result set based on SQL text and an optional set of arguments that are passed to the SQL text if it is parameterized.Table functions
TO_TIME , TIMEConverts an input expression into a time.Conversion functions , Date & time functions
TO_TIMESTAMP / TO_TIMESTAMP_*Converts an input expression into the corresponding timestamp.Conversion functions , Date & time functions
TO_UUIDConverts the input expression to a UUID value.Conversion functions
TO_VARIANTConverts any value to a VARIANT value or NULL (if input is NULL).Conversion functions
TO_XMLConverts a VARIANT to a VARCHAR that contains an XML representation of the value.Conversion functions , Semi-structured and structured data functions
TRANSFORMTransforms an array based on the logic in a lambda expression.Semi-structured and structured data functions
TRANSLATE (SNOWFLAKE.CORTEX)Translates the given input text from one supported language to another.String & binary functions
TRANSLATEReplaces characters in a string.String & binary functions
TRIMRemoves leading and trailing characters from a string.String & binary functions
TRUNCATE , TRUNCRounds the input expression down to the nearest (or equal) value closer to zero.Numeric functions
TRUNCATE, TRUNCTruncates a DATE, TIME, or TIMESTAMP value to the specified precision.Date & time functions
TRY_BASE64_DECODE_BINARYA special version of BASE64_DECODE_BINARY that returns a NULL value if an error occurs during decoding.String & binary functions
TRY_BASE64_DECODE_STRINGA special version of BASE64_DECODE_STRING that returns a NULL value if an error occurs during decoding.String & binary functions
TRY_CASTA special version of CAST , :: that is available for a subset of data type conversions.Conversion functions
TRY_COMPLETE (SNOWFLAKE.CORTEX)Performs the same operation as the COMPLETE function but returns NULL instead of raising an error when the operation cannot be performed.String & binary functions
TRY_DECRYPTA special version of DECRYPT that returns a NULL value if an error occurs during decryption.Encryption functions
TRY_DECRYPT_RAWA special version of DECRYPT_RAW that returns a NULL value if an error occurs during decryption.Encryption functions
TRY_HEX_DECODE_BINARYA special version of HEX_DECODE_BINARY that returns a NULL value if an error occurs during decoding.String & binary functions
TRY_HEX_DECODE_STRINGA special version of HEX_DECODE_STRING that returns a NULL value if an error occurs during decoding.String & binary functions
TRY_PARSE_JSONA special version of PARSE_JSON that returns a NULL value if an error occurs during parsing.Semi-structured and structured data functions
TRY_TO_BINARYA special version of TO_BINARY that performs the same operation (i.e. converts an input expression to a binary value), but with error handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error).Conversion functions
TRY_TO_BOOLEANA special version of TO_BOOLEAN that performs the same operation (that is, converts an input expression to a Boolean value), but with error-handling support.Conversion functions
TRY_TO_DATEA special version of the TO_DATE function that performs the same operation (i.e. converts an input expression to a date), but with error-handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error).Conversion functions , Date & time functions
TRY_TO_DECFLOATA special version of TO_DECFLOAT that performs the same operation — that is, converts an input expression to a DECFLOAT — but with error-handling support.Conversion functions
TRY_TO_DECIMAL, TRY_TO_NUMBER, TRY_TO_NUMERICA special version of TO_DECIMAL , TO_NUMBER , TO_NUMERIC that performs the same operation of converting an input expression to a fixed-point number, but has error-handling support so that the function returns NULL if the conversion can’t be performed.Conversion functions
TRY_TO_DOUBLEA special version of TO_DOUBLE that performs the same operation (that is, converts an input expression to a double-precision floating-point number), but with error-handling support (that is, if the conversion can’t be performed, it returns a NULL value instead of raising an error).Conversion functions
TRY_TO_FILEA version of TO_FILE that returns NULL instead of raising an error.File functions
TRY_TO_GEOGRAPHYParses an input and returns a value of type GEOGRAPHY.Geospatial functions , Conversion functions
TRY_TO_GEOMETRYParses an input and returns a value of type GEOMETRY.Geospatial functions , Conversion functions
TRY_TO_TIMEA special version of TO_TIME , TIME that performs the same operation (i.e. converts an input expression into a time), but with error-handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error).Conversion functions
TRY_TO_TIMESTAMP / TRY_TO_TIMESTAMP_*A special version of TO_TIMESTAMP / TO_TIMESTAMP_* that performs the same operation (i.e. converts an input expression into a timestamp), but with error-handling support (i.e. if the conversion cannot be performed, it returns a NULL value instead of raising an error).Conversion functions
TRY_TO_UUIDA special version of TO_UUID that performs the same operation — that is, converts an input expression to a UUID value — but with error handling support.Conversion functions
TYPEOFReturns the type of a value stored in a VARIANT column.Semi-structured and structured data functions
U
UNICODEReturns the Unicode code point for the first Unicode character in a string.String & binary functions
UNIFORMGenerates a uniformly-distributed pseudo-random number in the inclusive range [min, max].Data generation functions
UPPERReturns the input string with all characters converted to uppercase.String & binary functions
UUID_STRINGGenerates either a version 4 (random) or version 5 (named) RFC 4122-compliant universally unique identifier (UUID) as a formatted string.String & binary functions , Data generation functions
V
VALIDATEValidates the files loaded in a past execution of the COPY INTO <table> command and returns all the errors encountered during the load, rather than just the first error.Table functions
VALIDATE_PIPE_LOADThis table function can be used to validate data files processed by Snowpipe within a specified time range.Information Schema , Table functions
VAR_POPReturns the population variance of non-NULL records in a group.Aggregate functions , Window function syntax and usage
VAR_SAMPReturns the sample variance of non-NULL records in a group.Aggregate functions , Window function syntax and usage
VARIANCE , VARIANCE_SAMPReturns the sample variance of non-NULL records in a group.Aggregate functions , Window function syntax and usage
VARIANCE_POPReturns the population variance of non-NULL records in a group.Aggregate functions , Window function syntax and usage
VECTOR_AVGComputes the element-wise average of vectors in an aggregate.Vector functions , Aggregate functions
VECTOR_COSINE_SIMILARITYComputes the cosine similarity between two vectors.Vector functions
VECTOR_INNER_PRODUCTComputes the inner product of two vectors.Vector functions
VECTOR_L1_DISTANCEComputes the L1 distance between two vectors.Vector functions
VECTOR_L2_DISTANCEComputes the L2 distance between two vectors.Vector functions
VECTOR_MAXComputes the element-wise maximum of vectors in an aggregate.Vector functions , Aggregate functions
VECTOR_MINComputes the element-wise minimum of vectors in an aggregate.Vector functions , Aggregate functions
VECTOR_NORMALIZENormalizes a VECTOR in the L2 vector space, giving its elements values in the range of [0,1] and giving it a magnitude of 1.Vector functions
VECTOR_SUMComputes the element-wise sum of vectors in an aggregate.Vector functions , Aggregate functions
VECTOR_TRUNCATETruncates a VECTOR to a smaller dimension.Vector functions
W
WAREHOUSE_LOAD_HISTORYThis table function can be used to query the activity history (defined as the “query load”) for a single warehouse within a specified date range.Information Schema , Table functions
WAREHOUSE_METERING_HISTORYThis table function can be used in queries to return the hourly credit usage for a single warehouse (or all the warehouses in your account) within a specified date range.Information Schema , Table functions
WIDTH_BUCKETConstructs equi-width histograms, in which the histogram range is divided into intervals of identical size, and returns the bucket number into which the value of an expression falls, after it has been evaluated.Numeric functions
X
XMLGETExtracts an XML element object (often referred to as simply a tag) from the content of the outer XML element based on the name and instance number of the specified tag.Semi-structured and structured data functions
Y
YEAR* / DAY* / WEEK* / MONTH / QUARTERExtracts the corresponding date part from a date or timestamp.Date & time functions
Z
ZEROIFNULLReturns 0 if its argument is null; otherwise, returns its argument.Conditional expression functions
ZIPFReturns a Zipf-distributed integer, for N elements and characteristic exponent s.Data generation functions