Built-in functions

Translation reference for all the supported built-in functions by SnowConvert for BigQuery.

Aggregate Functions

BigQuery
Snowflake

ANY_VALUE Note: Unlike BigQuery, Snowflake does not ignore NULLs . Additionally, Snowflake's OVER() clause does not support the use of ORDER BY or explicit window frames.

ANY_VALUE( expr1, HAVING MAX expr2) ANY_VALUE( expr1, HAVING MIN expr2)

MAX_BY(expr1, expr1) MIN_BY(expr1, expr2)

Conditional Expressions

Conversion Functions

BigQuery
Snowflake

Date Functions

BigQuery
Snowflake

TO_CHAR Note: For further details on this translation, please consult this page.

Datetime Functions

BigQuery
Snowflake

Geography Functions

BigQuery
Snowflake

ST_GEOGFROMTEXT Note: For further details on this translation, please consult this page.

ST_POINT Note: For further details on this translation, please consult this page.

JSON Functions

BigQuery
Snowflake

JSON_EXTRACT_PATH_TEXT

Notes: SnowConvert automatically translates BigQuery JSON paths to their Snowflake equivalents.

Mathematical Functions

BigQuery
Snowflake

ROUND(X) ROUND(X, Y) ROUND(X, Y, 'ROUND_HALF_EVEN') ROUND(X, Y, 'ROUND_HALF_AWAY_FROM_ZERO')

ROUND(X) ROUND(X, Y) ROUND(X, Y, 'HALF_TO_EVEN') ROUND(X, Y, 'HALF_AWAY_FROM_ZERO')

Numbering Functions

String Functions

BigQuery
Snowflake

TRY_BASE64_DECODE_BINARY Notes: BigQuery defaults to BASE64 for binary data output, but Snowflake uses HEX. In Snowflake, you can use the BASE64_ENCODE function or set BINARY_OUTPUT_FORMAT to 'BASE64' to view binary data in BASE64.

TRY_HEX_DECODE_BINARY Notes: BigQuery defaults to BASE64 for binary data output, but Snowflake uses HEX. In Snowflake, you can use the BASE64_ENCODE function or set BINARY_OUTPUT_FORMAT to 'BASE64' to view binary data in BASE64.

SUBSTR(string, position) SUBSTRING(string, position) SUBSTR(sttring, position, length) SUBSTRING(sttring, position, length)

SUBSTR(string, IFF(position < -LENGTH(string), 1, position)) SUBSTRING(string, IFF(position < -LENGTH(string), 1, position)) SUBSTR(sttring, IFF(position < -LENGTH(string), 1, position), length) SUBSTRING(sttring, IFF(position < -LENGTH(string), 1, position), length)

Timestamp Functions

Last updated