QuestionQ63

VerifiedOfficial exam objectives/topics

A Data Engineer is processing Google Analytics data. The data is stored as JSON in a landing table named GA_EVENTS. It has a single column named JSON_VALUE with the following structure:

Question Image

How can the data be extracted into this relational representation?

Question Image

Explanation

Snowflake colon path notation retrieves fields from VARIANT objects, while FLATTEN converts repeating array elements into rows. Because sessions is an array and each session contains a nested metrics array, two lateral FLATTEN operations are required: one for sessions and one for the metrics within each session. This yields a row for every session-metric combination along with the event and country fields.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!