【问题标题】:Inserting String Array through CSV format in ClickHouse db在 ClickHouse db 中通过 CSV 格式插入字符串数组
【发布时间】:2017-01-14 02:28:49
【问题描述】:

我有一张简单的桌子:

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)

【问题讨论】:

    标签: clickhouse


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2021-02-19
      • 2019-03-04
      • 2020-04-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多