-
Optimizing JSON Export with Null Values in BigQuery's Delimited Format
Hey friends!
Just wondering if any of you have tripped over this issue as well. I’ve been trying to save GA4 query results in BigQuery as JSONL (delimited) but I’m hitting some snags. Specifically, columns that have NULLS are just poof – gone in the downloaded JSON. If you try to throw the lot back in as a table (upload -> JSONL) and run a query, you’ll see what I mean.Also weird: the order of the columns changes after import. They don’t match the original lineup pre-export. Is that just me?
If you’ve battled this beast and won, I’d love to hear about the solution you found. Basically, how do you download and then re-upload a JSON with the same structure that it had originally?
Btw, if you’re scratching your heads thinking “why would anyone download and re-upload a JSONL?”, it’s actually just to experiment with options that step outside the Google cloud ecosystem. And when I say NULLS are missing, I’m talking about things like ‘float_value’ or ‘double_value’ from GA4 Bigquery export(event_params), which vanish if they were all NULLs in the first place.
Full of gratitude for any insights you can share!
A quick recap of my trials and tribulations:
– NULLS in columns become missing in action, which is confusing ’cause I expected them to stick around like a loyal json local.
– After import, the column sequence has been shuffled compared to how they looked pre-export. So uncool.
Log in to reply.