在BigQuery中拆分字符串列 [英] Splitting a string column in BigQuery
本文介绍了在BigQuery中拆分字符串列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
比方说,我在BigQuery中有一个包含2列的表.第一列代表一个名称,第二列代表一个定界的值列表,其长度是任意的.示例:
Let's say I have a table in BigQuery containing 2 columns. The first column represents a name, and the second is a delimited list of values, of arbitrary length. Example:
Name | Scores
-----+-------
Bob |10;20;20
Sue |14;12;19;90
Joe |30;15
我想转换成列,其中第一个是名称,第二个是单个得分值,如下所示:
I want to transform into columns where the first is the name, and the second is a single score value, like so:
Name,Score
Bob,10
Bob,20
Bob,20
Sue,14
Sue,12
Sue,19
Sue,90
Joe,30
Joe,15
这可以单独在BigQuery中完成吗?
Can this be done in BigQuery alone?
推荐答案
大家好消息! BigQuery现在可以SPLIT()!
查看全文