JSON_EXTRACT_PATH_TEXT

functionsupportedCore SQL functions

docs.snowflake.com ↗

Semi-structured and structured data functions

Parses the first argument as a JSON string and returns the value of the element pointed to by the path in the second argument. This is equivalent to TO_VARCHAR(GET_PATH(PARSE_JSON(JSON), PATH))

Syntax

JSON_EXTRACT_PATH_TEXT( <column_identifier> , '<path_name>' )

Parameters

NameRequiredDescription
column_identifierrequiredThe name of the column with the data that you want to extract.
path_namerequiredA string that contains the path to the element that you want to extract.

Returns

The data type of the returned value is VARCHAR.

Usage notes