I have an object in bigQuery that stores all possible parameters in the system. Therefore somewhere under the hood the 'parameter' object, has a lot of keys, and when I build a query to SELECT param
it returns a lot of columns with null, and maybe only 1 with a value, which makes it impossible to analyze as the output table is incredibly wide.
How can I write the query so that it returns 1 column, with only the non null key/value pair?
i.e.
instead of returning:
param.phone
, param.lob
, param.destination
, param.id
, param.1
, param.2
etc with null
values
i want to see one column with value {"e_line_of_business":"internet"}
or any other non-null key/values.
It's ok to be stringified.