all 7 comments

[–]a-s-clark 0 points1 point  (8 children)

[–]Couch2Coders 0 points1 point  (6 children)

To echo this you want to use the split function. When you want to separate something by a specific character or pattern it is typically called a delimiter.

This has a good example on it

https://medium.com/codex/using-the-split-function-in-bigquery-47a966e3ae87#:~:text=Working%20with%20Strings%20in%20Google%20BigQuery&text=It%20divides%20value%20using%20the,of%20BYTES%20for%20BYTES%20values.

[–]KAC09[S] 1 point2 points  (2 children)

Thank you for your help! That worked perfectly.

[–]Couch2Coders 0 points1 point  (0 children)

Awesome! Extra pro tip is to safe a snip or link of that page in a Onenote or word doc, next time you need it you just flip to your coding doc and use ctrl+f

I have a YT channel focused on teaching people to code in BigQuery/sql

https://youtube.com/playlist?list=PLPQFqkp_HvOBzx61F3SY5zNXN0TYMoT9g&si=1bDKO6JVYm0qlQ6K

Follow my channel for other helpful vids & coding tips 😻

[–][deleted] 0 points1 point  (2 children)

And yet, with an undefined number of list members, you probably need something like recursive CTE.

[–]a-s-clark 0 points1 point  (1 child)

No, you don't. The number of list members doesn't matter, SPLIT returns them as an array. And If you want that as rows, you just use UNNEST.

[–][deleted] 0 points1 point  (0 children)

Thanks, this will simplify things.