1 Answer
- Newest
- Most votes
- Most comments
1
To load the sample JSON file into Redshift with the key
column as multiple rows, you'll need to flatten the nested col2
array. Redshift doesn't directly support flattening nested arrays into rows, so you'll need to preprocess the file. Use a script to flatten the array into separate JSON objects, upload the preprocessed file to S3, and then use a JSONPaths
file and the COPY command in Redshift to load the data into a staging table. From there, you can further process the data as needed before inserting it into your target table.
Relevant content
- asked 2 months ago
- Accepted Answerasked 4 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago