因此,我一直在尝试使用雪花中的REPLACE()来解析文本数据,以创建一个新的数据集,但无法使其工作。
以下是我的数据:
text date ID
I am the one 2021-01-02 001
harry potter I'd 2021-01-03 002ID对于每一行都是唯一的。我想在Snowflake中将其更改为以下格式
word date ID
I 2021-01-01 001
am 2021-01-01 001
the 2021-01-01 001
one 2021-01-01 001
harry 2021-01-03 002
potter 2021-01-03 002
I'd 2021-01-03 002分隔符将是“”。
发布于 2021-09-14 18:40:56
Snowflake有用于简单分隔符的split_to_table():
select s.value as word, t.date, t.id
from t, lateral
split_to_table(t.text, ' ') s;https://stackoverflow.com/questions/69182933
复制相似问题