Import text file dialog with new features

ansgar's profile image ansgar posted 14 years ago in News Permalink
Issue #2134 reported that there are users which do not have the privilege to fire a LOAD DATA command, which rendered HeidiSQL's "import textfile" feature useless for them. So, I recently implemented a client-side parser for CSV files. The new parser does its best to detect the right values while avoiding any slow loop code. On huge files it's slightly slower than a LOAD DATA command processed on the server but I think that's very ok, especially if there is no alternative to a client-side parser.



Another new useful thing is the option "Input file contains local formatted numbers", which basically converts the local decimal and thousand separators to those chars MySQL expects. This allows fixing wrong numbers being inserted into your database, e.g. in cases of german numbers of let's say 12.345,6789 which is parsed by the server as 12.345 . The new checkbox option solves this problem for the client parser as well as for the LOAD DATA method. Thanks to bas_vu for the hints!
1 attachment(s):
  • importtextfile-refactored
[expired user #5187]'s profile image [expired user #5187] posted 14 years ago Permalink
Hello,

The "Lines starting by" option should also be very usefull.

Thank you!
ansgar's profile image ansgar posted 14 years ago Permalink
What and where is this "Lines starting by" thingy, please?
ansgar's profile image ansgar posted 14 years ago Permalink
Oh, didn't see that yet: http://dev.mysql.com/doc/refman/5.1/en/load-data.html .

Only I don't see some use case for that option, do you?
ansgar's profile image ansgar posted 14 years ago Permalink
I mean, I never had a file to import which had some "crap" at the beginning of each line to ignore. So I don't see a use case from a pure practical point of view. But maybe I'm wrong.
[expired user #5187]'s profile image [expired user #5187] posted 14 years ago Permalink
Hello,

I use to import into MySQL a lot of tab delimiter txt files,
and some of them have lines starting by '\t'

I can import those files using "load data local infile .." in scripts.

In my optinion the option "Lines starting by" option was the only one missing from the "Import text file" dialog.

Anyway, thank you for HeidiSQL!

I'm using it daily for the last 6 months, and I consider it much better and more user friendly than the other MySQL front-ends I used till now.

Thank you!

Please login to leave a reply, or register at first.