Skip to content
Advertisement

fetch key value pairs from array objects in sql BigQuery

I need to parse the column mapping and fetch the key value pairs from the second object in array. I would like to create new columns with the fetched data. The data looks like this:

The desired output:

Advertisement

Answer

Below is one of the approaches (BigQuery Standard SQL)

if to apply above to sample data from your question – result is

enter image description here

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