hgunawan
3/15/2019 - 1:21 PM

bq_unnest.sql

#standardSQL
WITH sample_table
AS (
  SELECT 1 AS id, [1,2,3] AS arr
  UNION ALL
  SELECT 2 AS id, [6,6,6] AS arr
)
SELECT id, unest_arr FROM sample_table t, t.arr as unest_arr