尝试在cassandra中导入批量数据,但无法使用copy命令插入。大约有100000个文件。
尝试
copy dc FROM '/home/hukke/1.csv' WITH MAXBATCHSIZE=10000;
copy dc FROM '/home/hukke/1.csv' WITH HEADER=true;
但无法插入它们,这些错误不断弹出。
Failed to import 13 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="String didn't validate.", will retry later, attempt 1 of 5
Failed to import 14 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="String didn't validate.", will retry later, attempt 1 of 5
Failed to import 12 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="String didn't validate.", will retry later, attempt 1 of 5
Failed to import 16 rows: InvalidRequest - Error from server: code=2200 [Invalid query] message="String didn't validate.", will retry later, attempt 1 of 5
答案 0 :(得分:0)
尝试了多次,并找到了许多用例后,发现这是可行的
COPY dc5 (table columns names ) FROM '/home/hukke/122.csv' WITH HEADER = true AND DELIMITER = ',';