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

Connected

Exercise

Finding the type of JSON data

Sometimes, you may be tasked to work with a semi-structured dataset with little documentation. When this is the case, you may have to do a certain amount of discovery around data schema and types. To help with this, Postgres offers the json_typeof function, which you'll explore more of in this exercise.

A connection to the disneyland database has been created and is available in the db_engine variable. pandas has been imported as pd, and is ready to use. Happy querying!

Instructions

100 XP
  • Extract the type of the location field from the review column in the nested_reviews table, aliasing the result as location_type.
  • Execute the query using pandas, and print the result set.