We don't bite newbies here... much | |
PerlMonks |
Re: Best method to load a csv file.by CountZero (Bishop) |
on Dec 17, 2004 at 23:56 UTC ( [id://415807]=note: print w/replies, xml ) | Need Help?? |
I had a similar problem: differently formatted CSV-files to be unified and entered into one DB. Best approach (for me) was to write a script for each type of CSV-file (using Text::CSV_XS) and dumping the data from these CSV-files into a temporary table (either through a loader or with DBI and then finally transfer the data from the temporary table to the main DB (again with DBI. A dedicated loader is indeed faster than DBI, but if you take into account the time to write out the "unified" CSV-file as well, I'm not so sure that you win much time in the end. CountZero "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In Section
Seekers of Perl Wisdom
|
|