CSV Import

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
Sandy
Posts: 53
Joined: Fri 07 Feb 2014 18:11

CSV Import

Post by Sandy » Sat 09 Jan 2016 01:36

Ran into a problem importing CSV with quoted strings. This is the row that has an issue -

Code: Select all

"24","Automobile Magazine","http://en.wikipedia.org/wiki/Automobile_Magazine_All-Stars","","Automobile Of The Year","y","\"BMW has produced a car that is the gold standard for its class, something that all other automakers feel they have to measure up to.\"","2006"
The importer has a problem with the escaped quote that can be seen right before BMW above. I think it is standard practice to do this, but no 100% sure. In any case is their a way to set up the import wizard to properly import the quoted escaped style strings?

Running dbForge Studio 6.3.341

Thanks

Sandy

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: CSV Import

Post by .jp » Thu 14 Jan 2016 14:47

Hello.

You do not need to insert the slash "\" character to escape the quote. To import a quoted string, you need to replace the slash character with just double quotes.

Best Regards.

Sandy
Posts: 53
Joined: Fri 07 Feb 2014 18:11

Re: CSV Import

Post by Sandy » Tue 19 Jan 2016 16:45

That would not work since I am not the creator of the import data. It from another source that exports to that particular format. MySQL has the option to set the quote delimiter in a statement like -

LOAD DATA LOCAL INFILE 'DEF_AWARD.csv' INTO TABLE DEF_AWARD FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' IGNORE 1 LINES;

Setting the Escape char would be something very helpful. Otherwise I have to run the above statements in the dbForge and often has failure on larger imports where the import works great except for the escaped chars.

Sandy

alexa

Re: CSV Import

Post by alexa » Wed 20 Jan 2016 16:51

Please vote for the following new functionality suggestion on our UserVoice forum that we added on your behalf http://devart.uservoice.com/forums/2251 ... hen-perfor

We collect and analyze the information from this forum in order to make a proper roadmap for future product releases.

Post Reply