0

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.

JOAO12
  • 45
  • 7
  • Do you have [local_infile](https://dev.mysql.com/doc/mysql-shell/8.0/en/mysql-shell-utilities-parallel-table.html) set? – danblack Mar 08 '20 at 21:49
  • @danblack, I have already set local_infile ON. Command: "SET GLOBAL local_infile = TRUE;" – JOAO12 Mar 08 '20 at 21:56

0 Answers0