Cast to INTERVAL datatype
Translation specification for the transformation of casts to the INTERVAL datatype to Snowflake
Description
Snowflake does not support the Interval data type, but it has INTERVAL constants that can be used in DateTime operations, SnowConvert will transform CAST functions of literal values to the INTERVAL datatype into an equivalent INTERVAL constant or TIMESTAMPADD function only if these constants are being used in DateTime operations.
Sample Source Patterns
Interval literals used in DateTime operations
Teradata
Snowflake
Known Issues
1. Uses of INTERVAL casts are not supported outside of DateTime operations
Since Snowflake does not support the INTERVAL, SnowConvert will warn the user that the datatype is not supported when used outside of DateTime operations.
2. Casts of non-literal values to INTERVAL are not supported
To create the necessary INTERVAL constant or TIMESTAMPADD function SnowConvert requires the value being cast to be a literal, if it is not the case then the cast will be marked as INTERVAL datatype not supported.
Related EWIs
MSCEWI2002: Interval type not supported.
Last updated