XML file , need varying number of outputs files

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
alisoviejo
Participant
Posts: 49
Joined: Fri Nov 11, 2005 10:19 am

XML file , need varying number of outputs files

Post by alisoviejo »

Based on the source file which is an XML file, I need to create n number of output files using XSLT or other ideas. Does any one have experience doing that or can we not create files dynamically on the run based on the source data.
ALISO
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Aliso,

could you read the XML file into a DataStage job and then split your incoming data into several streams in a transform stage and output each of those to a XML output file of the appropriate format?
alisoviejo
Participant
Posts: 49
Joined: Fri Nov 11, 2005 10:19 am

Post by alisoviejo »

Hi Andrw,

Yes, but the number of streams vary each time and the job needs to create the files on the run based on the source XML file, is it possible ?
ALISO
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I can't think of a way to do that directly. I might approach this in a multi-pass system - the first pass gets all the possible file names into some list, then one more pass for each filename to filter the XML. Not necessarily efficient, but also not terribly complex to code.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

Hi Andrw,
Thanks for the thought and time. I did not get you when you say "the first pass gets all the possible file names into some list", so I am thinking, use a source XML Input Stage , then a XML Transformer and then ? how do I store the file names, basically the xslt will be generating different files itself.

Obviously new to this XSLT stuff ! Even though not efficient looks like an innovative idea
Thanks,
Vinay
alisoviejo
Participant
Posts: 49
Joined: Fri Nov 11, 2005 10:19 am

Post by alisoviejo »

Similar question
ALISO
Post Reply