Skip to content

Athena Queries for Nested JSON

Brian Wylie edited this page May 16, 2023 · 1 revision

If you have Nested JSON loaded in as string types in Athena, you can run queries like this to pull out fields from the JSON:

Lets say 'dns' is a nested JSON field.

 query = "select json_extract_scalar(dns, '$.rrtype') rrtype from heavy_dns"

References: