TO_CHAR
Translation specification for transforming the TO_CHAR function into an equivalent function concatenation in Snowflake
Description
The TO_CHAR function casts a DateTime or numeric value to a string. For more information check TO_CHAR(Numeric) and TO_CHAR(DateTime).
Both Snowflake and Teradata have their own version of the TO_CHAR function, however, Teradata supports plenty of formats that are not natively supported by Snowflake. To support these format elements SnowConvert uses Snowflake built-in functions and custom UDFs to generate a concatenation expression that produces the same string as the original TO_CHAR function in Teradata.
Sample Source Patterns
TO_CHAR(DateTime) transformation
Teradata
Snowflake
TO_CHAR(Numeric) transformation
Teradata
Snowflake
Known Issues
1. Formats with different or unsupported behaviors
Teradata offers an extensive list of format elements that may show different behavior in Snowflake after the transformation of the TO_CHAR function. For the list of elements with different or unsupported behaviors check SSC-EWI-TD0029.
Related EWIs
SSC-FDM-TD0029: Snowflake supported formats for TO_CHAR differ from Teradata and may fail or have different behavior.
Last updated