Regex functions
Translation specification for the regular expresions from Teradata to their Snowflake equivalents
Description
Both Teradata and Snowflake offer support for functions that apply regular expressions over varchar inputs. See the Teradata documentation and Snowflake documentation for more details.
Sample Source Patterns
Setup data
Teradata
Snowflake
Regex transformation example
Teradata
Snowflake
Known Issues
1. Snowflake only supports POSIX regular expressions
The user will be warned when SnowConvert finds a non-POSIX regular expression.
2. Teradata "match_arg" has some options unsupported in Snowflake
The options 'l' and 'x' have no counterpart in Snowflake and the user will be warned if SnowConvert finds them.
3. Fixed size of the CHAR datatype may cause different behavior
Some regex functions in Teradata will try to match the whole column of CHAR datatype in a table even if some of the characters in the column were left empty due to a smaller string being inserted. In Snowflake this does not happen because the CHAR datatype is of variable size.
4. REGEXP_SPLIT_TO_TABLE not supported
The function is currently not supported by Snowflake.
Related EWIs
MSCEWI2020: Only Posix regex supported.
MSCEWI2021: Unsupported use of the 'match_arg' parameter.
MSCEWI2031: The result may differ due to the char type having a fixed length in Teradata.
MSCEWI1031: Function not supported.
Last updated