Skip to content
Advertisement

Extracting data from JSON field in Amazon Redshift

I am trying to extract some data from a JSON field in Redshift.

Given below is a sample view of the data I am working with.

I am able to extract data for the first level namely data corresponding to fileFormat and data as below:

I am trying to extract information under data like name, age,dateofbirth

Advertisement

Answer

You could use Redshift’s native function json_extract_path_text
https://docs.aws.amazon.com/redshift/latest/dg/JSON_EXTRACT_PATH_TEXT.html

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement