Bug #70371 Misleading error message when importing csv
Submitted: 17 Sep 2013 16:43 Modified: 11 Dec 2013 15:09
Reporter: Lisa Ehrlinger Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:6.0.7 OS:Any
Assigned to: CPU Architecture:Any

[17 Sep 2013 16:43] Lisa Ehrlinger
Description:
When I tried to import a invalid csv file (e.g. with semicolons instead of commas and the colum namens in header) an error message shows up "Error calling Python function SQLUtils.importRecordsetDataFromFile". 

How to repeat:
1) Open SQL Editor
2) Add new table or select existing one
3) Execute select statement from this table
3) Select Button "Import records from an external file"
4) Wait until the file is load and see the error message

Suggested fix:
The error message should be informative, it should tell you that the format is probably wrong and what format you have to use (e.g. commas as file delimiter).
[17 Sep 2013 21:17] Peter Laursen
Cannot WB support ";" (or any character sequence for that sake) as delimiter?

LOAD DATA syntax (http://dev.mysql.com/doc/refman/5.6/en/load-data.html) has no specific requirement for delimiters in LOAD DATA. It may be any character sequence (even "|" or "***" or "$%$" or whatever).

But support for ";" is of course the most important.  On LOCALEs where "," is the decimal sign, it is a de-facto standards to use ";" as delimiter (for the simple reason that "," will not work if the data file contains decimal numbers formatted as per current LOCALE).

Peter
(not a MySQL/Oracle person)
[18 Sep 2013 6:12] Lisa Ehrlinger
It is possible to load everything with LOAD DATA. I am just referring to the "Import records from an external file"-Button. 

http://dev.mysql.com/doc/workbench/en/wb-sql-editor-live-editing-tabsheets.html
Import records from an external file: Imports data from a CSV file. Data is separated by a comma, and not the alternative CSV (; separated) MySQL Workbench export option. 

But I tried to import it once more just with semicolons and apart from the fact that the whole data of every line is written in the first column, there is no error message. Therefore the main problem is obviously the header line (datatyp problem?).
[22 Oct 2013 20:06] Alfredo Kojima
Hi 
Can you attach a sample file that causes the error?
[11 Dec 2013 15:09] Alfredo Kojima
I was unable to repeat any error messages, I just got all data imported into a single cell (since there were no actual separators). Confirmed with QA.