Say I have this arrays in bigquery (the result of splitting a string)
["user_id: 1342", "foo: bar", "baz: xxx"]
["user_id: 4312", "foo: ds", "baz: dss"]
["user_id: 512", "foo: fsf", "baz: aas"]
....
I wonder if there is an option get result as a table that looks like this:
| user_id | foo | baz |
|---|---|---|
| 1342 | bar | xxx |
| 4312 | ds | dss |
| 512 | fsf | aas |
| ... | ... | ... |
What I'm trying to do is to parse logs message that have this structure:
some log text... user_id: 123, foo: bar, baz: xxx
I already parsed the string to have the initial arrays by using SUBSTR, STRPOS and SPLIT, but I can't figure how to move the keys to the column and have the final result.