1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Redshift

Connected

Exercise

Extracting nested JSON keys

The field team would now like you to extract the current temperature and the temperature at 4AM. They said the hour_temperature key contains an array that starts at 12AM or midnight. The JSON is in the CTE for you again.

Instructions

100 XP
  • Extract the current temperature AS current_temp from the weather station data.
  • Extract the 'hourly_temperature' at 4AM as four_am_temp from the weather station data.