I have JSON data which is saved in BigQuery as a string.
{
"event":{
"action":"prohibitedSoftwareCheckResult",
"clientTime":"2017-07-16T12:55:40.828Z",
"clientTimeZone":"3",
"serverTime":"2017-07-16T12:55:39.000Z",
"processList":{
"1":"outlook.exe",
"2":"notepad.exe"
}
},
"user":{
"id":123456,
}
}
I want to have a result set where each process will be in a different row. Something like:
UserID ProcessName
-------------------------
123456 outlook.exe
123456 notepad.exe
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?
"processList: ["outlook.exe", "notepad.exe"]. As it is, I suppose getting your results would require knowing first all keys inside processList (such as "1", "2", and so on) - Willian Fuks