JSON_EXTRACT_PATH_TEXT
Description
The JSON_EXTRACT_PATH_TEXT function returns the value for the key-value pair referenced by a series of path elements in a JSON string.. (RedShift SQL Language Reference JSON_EXTRACT_PATH_TEXT Function)
Grammar Syntax
This function is fully supported by Snowflake.
Sample Source Patterns
Input Code:
Output Code:
Input Code using Variables as paths:
Output Code:
Known Issues
Redshift treats different characters when they are newline, tab, and carriage compared to Snowflake. Redshift interprets the characters as the characters themselves. Snowflake applies it.
Snowflake function receives two parameters: the first one is the JSON Literal, and the second one is the path separated by a dot to access the inner objects. The transformation replaces the list of paths into a function that will join the paths separated by dots, even if it is a column reference.
When the path is sent through a variable, and the variable contains spaces, it should be quoted.
Related EWIs
No issues were found.
Last updated