-
Utilizing GA4 Data Stored in BigQuery with PowerBI Integration
So, I’m grappling with understanding GA4 data that’s stored in BigQuery and using it via Power BI. I’m kinda new to both these things, and I find JSON format particularly tricky to figure out.
I tried to decode it by following a tutorial to flatten the tables in BQ, which is provided in this link: https://www.ga4bigquery.com/tutorial-how-to-flatten-the-ga4-bigquery-export-schema-for-relational-databases-using-unnest/.
But, I got stumped again when I tried to query the flattened tables in PowerBI, because they had bunch of nested values without labels.
Here’s what my data looks right now:
| event_name | device | geo | traffic_source |
| – | – | – | – |
| page_view | {“v”:{“f”:[{“v”:”mobile”},{“v”:”Huawei”},{“v”:”YAL-L21″},{“v”:”Honor 20″},{“v”:null},{“v”:”Android”},{“v”:”Android 10″},{“v”:null},{“v”:null},{“v”:”ar-iq”},{“v”:”No”},{“v”:null},{“v”:null},{“v”:null},{“v”:{“f”:[{“v”:”Android Webview”},{“v”:”110.0.5481.185″},{“v”:”www.mypage.co.uk”}]}}]} | {“v”:{“f”:[{“v”:”Europe”},{“v”:”Ireland”},{“v”:”County Dublin”},{“v”:”Dublin”},{“v”:”Northern Europe”},{“v”:”(not set)”}]}} | {“v”:{“f”:[{“v”:”(organic)”},{“v”:”organic”},{“v”:”google”}]}} |But, I want to shuffle it around and pivot them into separate columns that look somewhat like this:
| event_name | geo.continent | geo.sub_continent | geo.country | etc… |
| – | – | – | – | – |
| page_view | Europe | Northern Europe | Ireland |Any ideas how I can get this sorted? Thanks in advance!
Log in to reply.