I have a table in BigQuery with millions of rows, and I want to split adx_catg_id column to multiple new columns. Please note that the adx_catg_id column contains an arbitra
Unfortunately there is no easy SPLIT() today in BigQuery - but it's a good feature request.
I like the answer you developed, I'll experiment more with it. For an alternative approach you can also try https://stackoverflow.com/a/18711812/132438.
The best way to automate this in the meantime, could be automating the query generation outside BigQuery.