Redshift Database JSON Parse Sample SQL Query
This Amazon Redshift database tutorial shows how Redshift database JSON json_extract_path_text function can be used to parse and extract attributes from JSON string stored in a table column.
Let's create a Redshift database table using following SQL DDL statement and populate database table with sample data.
Redshift database SQL developers can query sample table data and parse JSON stored in table column data using json_extract_path_text SQL JSON function
Output of above SQL Select statement is as follows
Of course, it is also possible to split expertise data and fetch each separate topic from the delimited list.
Here is a sample SQL to split by using split_part SQL string function on Redshift database.
The output of our sample Redshift database SQL Select query where we parse JSON data column values and split them using a separator column is as follows
In this Redshift database SQL query, we have seen a basic SQL code for parsing JSON data stored in a database table column by using json_extract_path_text function.
Just one last note for Amazon Redshift SQL programmers, to split string you can refer to Split String Delimited Data on Amazon Redshift Database using SQL tutorial.