在BigQuery中,可以使用UNNEST函数来遍历数组。下面是一个使用UNNEST函数遍历数组的示例代码:
SELECT
column1,
column2,
array_value
FROM
`project.dataset.table`,
UNNEST(array_column) AS array_value
在这个示例中,project.dataset.table
是你的表名,array_column
是包含数组的列名。UNNEST(array_column)
将数组展开成多行,然后将每个数组元素作为一个新的行返回。你可以在SELECT子句中选择需要的列,包括原始表的列以及UNNEST后的数组元素。