【发布时间】:2022-12-22 06:42:46
【问题描述】:
我尝试使用 clickhouse 选择一个 csv 文件,但我的列标题名称不包括在内,而是变成了第 1 行,就像这张图片enter image description here
this is my code :
SELECT
*
FROM file(
'trx_okt_2022.csv'
)
what can i add so it can read its header column name
【问题讨论】:
-
我尝试添加 CSV 格式 .. 结果为:代码:27。DB::ParsingException:无法解析输入:预期的 ',' 之前:\argo,C,,11,1,1,12359053\r\n2022-10- 01,1,988,PT Garuda':第 1 行:第 0 列,名称:日期,类型:日期,已解析文本:“date,Cli” 错误:日期后的垃圾:“entId,Pref” 错误:日期必须为 YYYY-MM -DD格式。 :执行 CSVRowInputFormat 时:执行文件时:(在文件/uri /var/lib/clickhouse/user_files/trx_okt_2022.csv 中):(在第 1 行)。 (CANNOT_PARSE_INPUT_ASSERTION_FAILED)
标签: csv clickhouse