distal-attribute
distal-attribute
distal-attribute
distal-attribute

Import text file dialog with new features

User, date Message
Written by ansgar
4 years ago
Category: News
5022 posts since Fri, 07 Apr 06
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!
Written by cedracu
4 years ago
2 posts since Fri, 24 Sep 10
Hello,

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

Thank you!
Written by ansgar
4 years ago
5022 posts since Fri, 07 Apr 06
What and where is this "Lines starting by" thingy, please?
Written by ansgar
4 years ago
5022 posts since Fri, 07 Apr 06
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?
Written by ansgar
4 years ago
5022 posts since Fri, 07 Apr 06
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.
Written by cedracu
4 years ago
2 posts since Fri, 24 Sep 10
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.