De-Nesting Google Analytics Data in BigQuery | by Martin Weitzmann | Mar, 2024

#DeNesting #Google #Analytics #Data #BigQuery #Martin #Weitzmann #Mar

The proper way to flat tables

Martin Weitzmann
Towards Data Science
Photo of Singapore by Mike Enerio on Unsplash

BigQuery is an analytics engine optimized to crunch pre-joined (or: nested) data. Sub-relations make sense in analytical scenarios because we don’t want to deal with joins over bigger datasets — just imagine daily year-over-year comparisons over the last 3 years, aggregating Terabytes of data — but with joins adding another layer of…