Link to home
Start Free TrialLog in
Avatar of Jerry N
Jerry NFlag for United States of America

asked on

XML to CTL in Oracle - XML Header File, XML Data

This is my first adventure into the wonderful world of XML.
I'm familiar with Oracle, PL/SQL, Basic, etc.
We've inherited two files. One has an XML extension and one has a CSV extension.
The .XML file has a name like ".....HeaderFormat.XML"
The CSV File is named ".....Header.CSV"
The CSV fields are terminated by a "|" except for the last field.

The last field is 2400 characters long and has an opening tag <AUTOsomething> <something2="value2" TYPE="Something3" ID=something2/> (more stuff with the 3 values) </AUTOsomething>
 This last field looks like it is a bunch of 3 field records concantenated between the <AUTOsomething> tag.

I need to break the "|" terminated data as well as the last field data.


How can I load the information into Oracle?
I would love to make a CTL file and load it that way.

(On a side note... Why XML....I dont get it.)
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Please provide sample data and expected results.  If you want the data loaded into a table, please provide the table definition.
Avatar of Jerry N

ASKER

I'm trying to figure out the process. Is it normal to get a FORMAT file, separate from the data and get a csv file with just data?
If so, how does one use the format file to get the data extracted?
There really is no normal when it comes to ETL (Extract, Transform, Load).  Most of the time you have to deal with what you are given.  It is very rare to be able to direct those providing you the files to change how they deliver it to you.
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
A penalty grade of B is not appropriate