2017-10-13 51 views

回答

2

What is the max limit of group_concat/string_agg in bigquery output? Elliott解釋了爲什麼STRING_AGG可能會產生內存不足錯誤。

要避免這個錯誤,你可以使用LIMIT停止一定數量的字符串後彙總:

#standardSQL 
SELECT STRING_AGG(CONCAT(word, corpus) LIMIT 10) AS words 
FROM `bigquery-public-data.samples.shakespeare` 
CROSS JOIN UNNEST(GENERATE_ARRAY(1, 1000)); 
相關問題