Transforming Several XML Docs into one Flat File

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
scinman
Participant
Posts: 1
Joined: Fri Jan 26, 2007 8:16 am

Transforming Several XML Docs into one Flat File

Post by scinman »

Sorry if this has already been asked, I tried checking around for other threads first. I am very new to DataStage and ETL in general, I'm a web developer by trade.

I have to develop a job that takes in a directory of XML files and parse through them to create one flat file at the end. Also, to make things more complicated, there are elements in the XML document that only exist in some instances, and in others they don't exist at all.

I've noticed that there is an xmltransform stage as well as xmlinput and you can use an XSLT stylesheet to transform as well. Does anyone have any advice on how to proceed and where I can find the doucmentation on these XML stages?

TIA for the help.
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard. :D

Look at the Folder stage; this may do what you require. Search the forum for techniques to use if the XML files are very large.

You could also construct multiple jobs (for the different sets of elements), and set the Sequential File (target) to append rather than overwrite.

Help on the XML stage types can be gotten by clicking on the Help button within each of these stages. Documentation is in XMLPACK_20_Designer.pdf which should be in your DataStage Docs folder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply