gpt4 book ai didi

clickhouse - 在 ClickHouse db 中通过 CSV 格式插入字符串数组

转载 作者:行者123 更新时间:2023-12-03 12:29:39 25 4
gpt4 key购买 nike

我有一个简单的表:

CREATE TABLE t1
(
v1 Int32,
a1 Array(Int32),
s2 Array(String)
) ENGINE = Memory

但无法弄清楚如何插入字符串数组:
insert into t1 format CSV 1,"[1,2]","[a1,a2]"

失败并出现以下错误:
Exception on client:
Code: 26. DB::Exception: Cannot parse quoted string: expected opening quote:
Could not print diagnostic info because two last rows aren't in buffer (rare case)
: (at row 1)

最佳答案

抱歉,重新阅读文档,发现数组中的字符串应该用单引号括起来。

 insert into t1 format CSV 1,"[1,2]","['a1','a2']"

关于clickhouse - 在 ClickHouse db 中通过 CSV 格式插入字符串数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39352259/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com