SSC-EWI-TD0051
Teradata BYTES function results differs from Snowflake LENGTH function for byte columns
Severity
Low
Description
Since Teradata byte datatype has a fixed length, BYTES function will always count the trailing zeros inserted to fit smaller byte type values into the column, returning the size of the column instead of the size of the value inserted originally. However, Snowflake binary type has variable size, meaning that the LENGTH function will always return the size of the inserted values. Take the following code as an example:
Teradata:
Equivalent code in Snowflake:
Example code:
Input code:
Output code:
Recommendations
Analyze the use given to the BYTES function results, the Snowflake LENGTH function behavior was the one desired from the start and no changes are required.
If you need more support, you can email us at snowconvert-support@snowflake.com
Last updated