Skip to content
Advertisement

Simplest way to unnest a BQ table

I can directly unnest an array from a literal in BQ as follows:

How can I do the same from a with statement? For example, something like:

What would be the correct syntax for the above? Here would be one example I came up with: is this the simplest way to do a general unnest?

If so, why can’t the above be done without a cross join?

Advertisement

Answer

How can I do the same from a with statement?

is this the simplest way to do a general unnest?

Yes!

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