anjamesc has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a requirement like this,

I have multiple flat file inputs say a,b,c,d,e,f,.... and they have to loaded to DB tables a,b,c,d,e..... or maybe I ll have a control table for that.

So each file has to be loaded to different tables.

Question

1) Do i have some modules to load the flat files directly to a Oracle DB/SQl DB and teradata?. If no- How must be my approach- I am not looking for overnight solutions here but an approach from the monks would help me move on in the right direction.

Thanks!

  • Comment on Loading Multiplle delimited flat files to DB

Replies are listed 'Best First'.
Re: Loading Multiplle delimited flat files to DB
by Corion (Patriarch) on Jul 03, 2012 at 07:23 UTC

    For bulk loading data, I recommend looking at the solutions the database provides. Oracle has sqlldr which can bulk-load CSV files and fixed-width files directly and much faster than an INSERT based solution with DBI.

    You may need to preprocess the files with Perl to assign the wanted default values or, like in my case, convert 00010101 to null for DATE fields.

Re: Loading Multiplle delimited flat files to DB
by Anonymous Monk on Jul 03, 2012 at 07:22 UTC