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

Importing CSV file

User, date Message
Written by klaaz
11 months ago
Category: Feature discussion
5 posts since Mon, 07 Oct 13
Just made a donation for this great piece of software which I am using on a daily bases. Keep up the good work!

I have one update I realy like to see in a future release. I use the CSV import weekly for multiple databases. It works fine but when I could save import profiles (selected columns and order of the columns) it would be perfect. Now I have to change them all again and again with every import and that takes a lot of time.

Is this difficult to build in?
Written by ansgar
11 months ago
4988 posts since Fri, 07 Apr 06
HeidiSQL preserves most of the settings for the next time you call that dialog, except for the field names and their order of a table.

For such a reoccurring query I recommend storing the LOAD DATA query in a snippet file: Just copy the LOAD command from the log window, paste it in a query tab, and store it as a snippet (right click > Save as snippet). That way, you have individual "profiles" for each table/file on which you want to do that.
Written by klaaz
11 months ago
5 posts since Mon, 07 Oct 13
Hi Ansgar, thanks for responding smile

I know HeidiSql saves most of the paramaters for the next import but I have different CSV files for different databases so I have to select a new file and database table everytime I use it.

Customers deliver CSV files seldom in a consequent layout so I allways have to make some adjustments in the columns selected and the order of them to fit both the CSV file and the database table.

Considering this, saving the query as a snippet is not doing the job in allmost all cases. It would be handy to save the column and order layout in a profile so it can be loaded and adjusted where needed instead of doing it all over again.
Written by ansgar
11 months ago
4988 posts since Fri, 07 Apr 06
Well, you can easily do that with a snippet file, or?
Written by klaaz
11 months ago
5 posts since Mon, 07 Oct 13
I often get a incomplete CSV file with, let's say, 4 columns to import in a table with 26 columns. In that case in HeidiSql I have to deselect 22 columns one at a time and reorder the selected ones according to the csv file.

Seems not a lot of work but when you have to do it often it is. And also more prone to error.

Saving the selected columns in a profile per job / table would be perfect as a starting point (their are allways changes) but a select / deselect all columns button on the importscreen would help a lot too. I know my question looks picky but I have to deal with all kinds of messy csv files.

Again, the CSV files are often not consequently ordered, so saving the load data query is not possible in most cases.
Written by ansgar
11 months ago
4988 posts since Fri, 07 Apr 06
I must say I still recommend snippets, as these give you the maximum flexibility and portability. You could nicely format the SQL in it, so you're very quick when adding new columns or changing the order.
Written by klaaz
11 months ago
5 posts since Mon, 07 Oct 13
I will, but please consider a select all / deselect all on the columns in a future upgrade, would make my life a lot easier ;-)

Thanks for the discussion and fast responses!
Written by ansgar
11 months ago
4988 posts since Fri, 07 Apr 06
Oh yes, select/deselect all is a good idea. Wasn't there such buttons in the past? (scratch head)
Written by klaaz
11 months ago
5 posts since Mon, 07 Oct 13
Not in my era ;-)
 

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