Skip to content
Advertisement

BigQuery query nested json

I have JSON data which is saved in BigQuery as a string.

I want to have a result set where each process will be in a different row. Something like:

I saw there is an option to query repeated data but the field needs to be RECORD type to my understanding.

Is it possible to convert to RECORD type “on the fly” in a subquery? (I can’t change the source field to RECORD).

Or, is there a different way to return the desired result set?

Advertisement

Answer

This could be a possible work around for you:

Using your JSON as example:

Results:

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement