I have a table that looks like this:
Emails | Data
---------------------------------------------------------------------------------
[email protected];[email protected];[email protected] | Foo
[email protected] | Bar
I want to parse out the delimited emails into their own rows such that it looks something like this:
Emails | Data
---------------------------------------------------------------------------------
[email protected] | Foo
[email protected] | Foo
[email protected] | Foo
[email protected] | Bar
I know there is a string_split function, but it would only work on the first column. I need some kind of join for this.
EDIT: Yes I know it breaks normal form, but bigquery for instance has an "unnest" function and has arrays as a datatype.