Skip to content
Advertisement

BigQuery JSON – Scalar subquery produced more than one element

I am trying to parse this json in BQ.

My desired output is

variant
helm,chart

I have tried the query below and I get the error: Scalar subquery produced more than one element.. If I rewrite this to use a nested arrays, everything works perfect. however, when I try to use a scalar subquery by following the same concept, it doesn’t work. I think this should work but I don’t know what I am missing.

Any help will be appreciated.

Advertisement

Answer

Consider below approach

if applied to sample data in your question – output is

enter image description here

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