Amazon Redshift will no longer support the use of Python UDFs after June 30, 2026.
We will start enforcing it in phases. For more information on the details of Python end of life
and migration options, see the
blog post
JSON_PARSE function
The JSON_PARSE function parses data in JSON format and converts it into the SUPER
representation.
To ingest into SUPER data type using the INSERT or UPDATE command, use the JSON_PARSE
function. When you use JSON_PARSE() to parse JSON strings into SUPER values, certain
restrictions apply. For additional information, see Parsing options for SUPER.
Syntax
JSON_PARSE( {json_string | binary_value} )
Arguments
- json_string
-
An expression that returns serialized JSON as a
VARBYTEorVARCHARtype. - binary_value
-
A VARBYTE type binary value.
Return type
SUPER
Examples
To convert the JSON array [10001,10002,"abc"] into the SUPER data type, use the following example.
SELECT JSON_PARSE('[10001,10002,"abc"]');+---------------------+ | json_parse | +---------------------+ | [10001,10002,"abc"] | +---------------------+
To make sure that the function converted the JSON array into the SUPER data type, use the following example. For more information, see JSON_TYPEOF function
SELECT JSON_TYPEOF(JSON_PARSE('[10001,10002,"abc"]'));+-------------+ | json_typeof | +-------------+ | array | +-------------+