Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Loading Files with Header and Footer

622006Feb 7 2008 — edited Feb 14 2008
I like to load Files which have header and footer line. In fact the headers and footer information is not absolutely needed to be loaded. It looks like this:
==============================================================
"TEST_TAB"|"2008-02-06 00:00:00"|"CUSTOMER"|"TEST_TAB.xsd"
"CUSTOMER_NAME"|"CUSTOMER_ADDRESS"|"ENTITY_ID"|"APPLICATION_ID"|"SOURCE_SYSTEM_ID"
"NAME 1"|"ADDRESS 1"|"RXPL"|"AC"|"MIDAS"
"NAME 2"|"ADDRESS 2"|"RXPL"|"AC"|"MIDAS"
"NAME 3"|"ADDRESS 3"|"RXPL"|"AC"|"MIDAS"
"NAME 4"|"ADDRESS 4"|"RXPL"|"AC"|"MIDAS"
"NAME 5"|"ADDRESS 5"|"RXPL"|"AC"|"MIDAS"
5|"2008-02-06 18:00:00"
==============================================================
To skip the 2 header lines is not the problem, but the footer is harder handle. Especially as the job should work on Windows and Unix (AIX/Linux) as well.
I tried with the LKM File to Oracle (SQLLDR) but the footer makes problems, especially
if the second column would be a numeric column (in fact I have to load serveral files wih different content definition, but similar structure.

I tend to do a pre-processing in Jython if I would know how to cut away the last row (if possible without reading the whole file (which could be GB).

Would be fine I somebody has a good idea.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2008
Added on Feb 7 2008
15 comments
2,213 views