Built-in Functions

This page provides a description of the translation for the built-in functions in Teradata to Snowflake

This page only lists the functions that are already transformed by SnowConvert, if a function from the Teradata documentation is not listed there then it should be taken as unsupported.

Some Teradata functions do not have a direct equivalent in Snowflake so they are transformed into a functional equivalent UDF, these can be easily spotted by the _UDF postfix in the name of the function. For more information on the UDFs SnowConvert uses check this git repository.

Aggregate Functions

TeradataSnowflakeNote

AVG

AVG

CORR

CORR

COUNT

COUNT

COVAR_POP

COVAR_POP

COVAR_SAMP

COVAR_SAMP

GROUPING

GROUPING

KURTOSIS

KURTOSIS

MAXIMUM

MAX

MAX

MINIMUM

MIN

MIN

PIVOT

PIVOT

Check PIVOT.

REGR_AVGX

REGR_AVGX

REGR_AVGY

REGR_AVGY

REGR_COUNT

REGR_COUNT

REGR_INTERCEPT

REGR_INTERCEPT

REGR_R2

REGR_R2

REGR_SLOPE

REGR_SLOPE

REGR_SXX

REGR_SXX

REGR_SXY

REGR_SXY

REGR_SYY

REGR_SYY

SKEW

SKEW

STDDEV_POP

STDDEV_POP

STDDEV_SAMP

STDDEV_SAMP

SUM

SUM

UNPIVOT

UNPIVOT

Unpivot with multiple functions not supported in Snowflake

VAR_POP

VAR_POP

VAR_SAMP

VAR_SAMP

See Aggregate functions​

Arithmetic, Trigonometric, Hyperbolic Operators/Functions

TeradataSnowflakeNote

ABS

ABS

CEILING

CEIL

DEGREES

DEGREES

EXP

EXP

FLOOR

FLOOR

HYPERBOLIC

ACOSH

ASINH

ATANH

COSH

SINH

TANH

HYPERBOLIC

ACOSH

ASINH

ATANH

COSH

SINH

TANH

LOG

LOG

LN

LN

MOD

MOD

NULLIFZERO(param)

CASE WHEN param=0 THEN null ELSE param END

POWER

POWER

RANDOM

RANDOM

RADIANS

RADIANS

ROUND

ROUND

SIGN

SIGN

SQRT

SQRT

TRUNC

TRUNC_UDF

TRIGONOMETRIC

ACOS

ASIN

ATAN

ATAN2

COS

SIN

TAN

TRIGONOMETRIC

ACOS

ASIN

ATAN

ATAN2

COS

SIN

TAN

ZEROIFNULL

ZEROIFNULL

See Arithmetic, Trigonometric, Hyperbolic Operators/Functions

Attribute Functions

TeradataSnowflakeNote

BIT_LENGTH

BIT_LENGTH

BYTE

BYTES

LENGTH

CHAR

CHARS

CHARACTERS

LEN

CHAR_LENGTH

CHARACTER_LENGTH

LEN

MCHARACTERS

LENGTH

OCTECT_LENGTH

OCTECT_LENGTH

See Attribute functions

Bit/Byte Manipulation Functions

TeradataSnowflakeNote

BITAND

BITAND

BITNOT

BITNOT

BITOR

BITOR

BITXOR

BITXOR

GETBIT

GETBIT

See Bit/Byte functions

Built-In (System Functions)

TeradataSnowflakeNote

ACCOUNT

CURRENT_ACCOUNT

CURRENT_DATE

CURDATE

CURRENT_DATE

CURRENT_ROLE

CURRENT_ROLE

CURRENT_TIME CURTIME

CURRENT_TIME

CURRENT_TIMESTAMP

CURRENT_TIMESTAMP

DATABASE

CURRENT_DATABASE

DATE

CURRENT_DATE

NOW

CURRENT_TIMESTAMP

PROFILE

CURRENT_ROLE

Check MSCEWI2068 for more details on this transformation

SESSION

CURRENT_SESSION

TIME

CURRENT_TIME

USER

CURRENT_USER

See Built-In Functions

Business Calendars

TeradataSnowflakeNote

DAYNUMBER_OF_MONTH(DatetimeValue, 'COMPATIBLE')

DAYOFMONTH

DAYNUMBER_OF_MONTH(DatetimeValue, 'ISO')

DAYNUMBER_OF_MONTH_ISO_UDF

DAYNUMBER_OF_MONTH(DatetimeValue, 'TERADATA')

DAYOFMONTH

DAYNUMBER_OF_WEEK(DatetimeValue, 'ISO')

DAYOFWEEKISO

DAYNUMBER_OF_WEEK(DatetimeValue, 'COMPATIBLE')

DAY_OF_WEEK_COMPATIBLE_UDF

DAYNUMBER_OF_WEEK(DatetimeValue, 'TERADATA') DAYNUMBER_OF_WEEK(DatetimeValue)

TD_DAY_OF_WEEK_UDF

DAYNUMBER_OF_YEAR(DatetimeValue, 'ISO')

PUBLIC.DAY_OF_YEAR_ISO_UDF

DAYNUMBER_OF_YEAR(DatetimeValue)

DAYOFYEAR

QUARTERNUMBER_OF_YEAR

QUARTER

TD_SUNDAY(DateTimeValue)

PREVIOUS_DAY(DateTimeValue, 'Sunday')

WEEKNUMBER_OF_MONTH

WEEKNUMBER_OF_MONTH_UDF

WEEKNUMBER_OF_QUARTER(dateTimeValue)

WEEKNUMBER_OF_QUARTER_UDF

WEEKNUMBER_OF_QUARTER(dateTimeValue, 'ISO')

WEEKNUMBER_OF_QUARTER_ISO_UDF

WEEKNUMBER_OF_QUARTER(dateTimeValue, 'COMPATIBLE')

WEEKNUMBER_OF_QUARTER_COMPATIBLE_UDF

WEEKNUMBER_OF_YEAR(DateTimeValue, 'ISO')

WEEKISO

YEARNUMBER_OF_CALENDAR(DATETIMEVALUE, 'COMPATIBLE')

YEAR

YEARNUMBER_OF_CALENDAR(DATETIMEVALUE, 'ISO')

YEAROFWEEKISO

See Business Calendars

Calendar Functions

TeradataSnowflakeNote

DAYNUMBER_OF_WEEK(DatetimeValue)

TD_DAY_OF_WEEK_UDF

DAYNUMBER_OF_WEEK(DatetimeValue, 'COMPATIBLE')

DAY_OF_WEEK_COMPATIBLE_UDF

QuarterNumber_Of_Year(DatetimeValue, 'ISO')

QUARTER_OF_YEAR_ISO_UDF(DatetimeValue)

TD_DAY_OF_CALENDAR

TD_DAY_OF_CALENDAR_UDF

TD_DAY_OF_MONTH

DAYOFMONTH

TD_DAY_OF_WEEK DAYOFWEEK

TD_DAY_OF_WEEK_UDF

TD_DAY_OF_YEAR

DAYOFYEAR

TD_WEEK_OF_CALENDAR(DateTimeValue)

DATEDIFF('WEEK', '1900-01-01', DateTimeValue)

TD_WEEK_OF_YEAR

WEEK_OF_YEAR_UDF

TD_YEAR_BEGIN(DateTimeValue)

YEAR_BEGIN_UDF(DateTimeValue)

TD_YEAR_BEGIN(DateTimeValue, 'ISO')

YEAR_BEGIN_ISO_UDF(DateTimeValue)

TD_YEAR_END(DateTimeValue)

YEAR_END_UDF(DateTimeValue)

TD_YEAR_END(DateTimeValue, 'ISO')

YEAR_END_ISO_UDF(DateTimeValue)

WEEKNUMBER_OF_MONTH(DateTimeValue)

WEEKNUMBER_OF_MONTH_UDF(DateTimeValue)

WEEKNUMBER_OF_QUARTER(DateTimeValue)