MySQL shell multi threaded load data infile

530 Views Asked by At

I have a csv file (path: D:\Column_2.csv) and when run the below MySQL Shell command, appears an error message:

Util.importTable: Cannot open file 'D:/Column_2.csv' (Runtime Error)

(Java Script)

util.importTable("D:/Column_2.csv", {schema: "data", table: "table_2", columns: ["col_1"], dialect: "csv-unix", skipRows: 0, showProgress: true, fieldsOptionallyEnclosed: true, fieldsTerminatedBy: ",", linesTerminatedBy: "\n", fieldsEnclosedBy: '"', threads: 8, bytesPerChunk: "1G", maxRate: "2G"})

What should be done in order to solve this problem? Thanks.

Update: In order to make this post easier to understand, I ended up writing the path as "D:/Column_2.csv" but, in fact, the csv file had a long file name. When I renamed the csv file with a shorter name, the code worked correctly.

0

There are 0 best solutions below