forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Import Wizard + Csv With No File Headers
- This topic is empty.
-
AuthorPosts
-
-
January 27, 2015 at 6:23 pm #13310chris2015Member
hi all
In SQLyog I’m trying to import CSV files (without field headers) into a table with matching column count and type/size definition.
The files are from an external company and I’m not able to request the headers are included.
However, a manual ‘LOAD DATA INFILE’ works perfectly but I want to be able to schedule this task.
I assume the import wizard is the easiest way / my familiar way.
I can’t get any of the import wizards to process a file without a header, either as a direct CSV import or ODBC import referencing the folder of CSV files.
I could (as give-up solution) script to insert file headers before import. I prefer to persist…
Once I select my destination table, I tried all combination of adjustments in the ‘Column Mapping and Transformations’ form (as attached).
The wizard understandably takes the first like of file data as column headings and then I can set the destination columns.
Issue is there are repeat values in the file so header duplication results and the import process fails / the mapping has been reconfigured by the wizard.
Is it possible to edit the SQL once the job is saved (I guess XML file) to perform a ‘LOAD DATA INFILE’ rather than the field mapping of the wizard?
I’m running SQLyog Enterprise – v12.04(64bit).
Any bright ideas?
Much appreciated for any experience shared.
Chris
-
January 28, 2015 at 4:21 am #35180Abhishek Kumar PandeyMember
Hi Chris,
You can try SQL scheduler and reporting wizard (CTRL+ALT+N) to automatically execute SQL queries, in your case query is ‘LOAD DATA INFILE’. You can also schedule execution of ‘LOAD DATA INFILE’ for your requirement. Hope It helps.
-
-
AuthorPosts
- You must be logged in to reply to this topic.