The ERROR message on a failed import job from csv doesn't accurately show the right number of columns.
To Reproduce
file f.csv
1,"hello,world"
root@:26257/defaultdb> create table t (id int primary key, name string, age int);
root@:26257/defaultdb> import into t csv data ('http://localhost:3000/f.csv');
ERROR: http://localhost:3000/f.csv: error parsing row 1: expected 3 fields, got 2 (row: "1,hello,world")
From the error message, it looks like the row has 3 fields, not 2.
So I think it would be better to paste the row in raw format: 1,"hello,world"
Environment:
root@:26257/defaultdb> select version();
version
----------------------------------------------------------------------------------------
CockroachDB CCL v21.2.4 (x86_64-apple-darwin19, built 2022/01/10 18:53:16, go1.16.6)
(1 row)
Describe the problem
The ERROR message on a failed import job from csv doesn't accurately show the right number of columns.
To Reproduce
file
f.csv
From the error message, it looks like the row has 3 fields, not 2.
So I think it would be better to paste the row in raw format:
1,"hello,world"
Environment:
Jira issue: CRDB-13161