The wall most people hit in the GA4 export is not the SQL, it is the shape: columns that contain other columns, and columns that contain whole arrays. Those are nested and repeated fields, and once they click, the export stops fighting you. Here is what they are.

Nested fields are structs

A nested field is a RECORD, a struct that groups related columns under one name. device, geo, and traffic_source are nested, so instead of a flat device_category column you read device.category with dot notation. Nothing to unpack here – you just address the sub-field directly.

Repeated fields are arrays

A repeated field is an array of values, often an array of structs. event_params, user_properties, and items are repeated, because a single event can carry many parameters and an order can carry many products. You cannot read these with dot notation; you have to UNNEST the array into rows first.

Why GA4 uses this shape

The design is deliberate rather than awkward for its own sake:

  • One row per event stays clean even when events carry wildly different parameters.
  • Arrays hold a variable number of items – three products or thirty – without reshaping the data.
  • Nesting keeps related attributes together instead of sprawling across hundreds of flat columns.

The mental model that fixes it

The shortcut is a single rule: if a field is a plain RECORD, reach into it with a dot; if it is REPEATED, UNNEST it. Dot notation for device.category, UNNEST for event_params. Once you sort every field into one of those two buckets, the whole export becomes navigable, because every query is just those two moves in combination.

The wall was never the SQL, it was the shape – structs inside columns and arrays inside rows. Nested fields you reach with a dot; repeated fields you UNNEST; and GA4 uses both so one row can honestly hold one messy, variable event. Sort each field into those two buckets and the export that fought you turns into the most flexible data you have.

Want a stronger data analyst role or a raise? Grab the FREE Product Analyst Playbook and get the exact roadmap to your next offer.