Working with GA4 data in BigQuery can sometimes feel like sorting through a box of mixed-up toys. If you want to pull out each toy and examine it closely, you’ll need the UNNEST operator.

UNNEST is like someone carefully laying out all the toys from the box on the floor so you can easily count and analyze them. In simpler terms, if you have an array of data and need to break it down into individual rows, UNNEST is your go-to tool.

Let’s say you have a table of GA4 events. If you want to see which products were added to carts, use UNNEST as shown in the screenshot.

That’s it! UNNEST has taken your data array and turned it into organized rows, making your analysis much easier.

So, if you ever find yourself dealing with arrays in GA4 exports, remember: UNNEST is your best friend for untangling all that data and making sense of it.

If you work with GA4 to BigQuery exports, be sure to check out my SQL cheat sheet.