To create XML data which stages to use.

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
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

To create XML data which stages to use.

Post by highpoint »

Hi,


I have to load a flat file which has 4 key columns and around 50 data columns. I would like to load this into a table that has 4 key columns and
one xml column. I would like to load all the 50 columns data in to this single xml column.

For doing that when I see IBM documentation I see 2 pdfs one for xml pack (XML Input, XML Output, XML Transformer) and the other is XML transformation guide for new XML stage.

Note: I am using DataStage 8.7 and got basic concepts about XML,XSD,XSLT.

Please let me know which stages would I have to use to accomplish the task.

Is it XML pack (XML Input, XML Output, XML Transformer) or the new XML stage?

Please let me know the steps also?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

If you have an xsd (xml schema definition), and you expect to be doing a lot of xml work, and the document is fairly complex (find a finished document that illustrates what you are creating), then consider spending time learning the new xml stage.

Complex as noted above, means "more than one independent repeating node".....so...for instance, if you had purchase order, with "n" address nodes (places where things need to be sent) and "m" items being shipped (unrelated to each other except via the purchase order number), that would be "complex" by that definition. Of course, such complexity increases as you get more paths, more repeating nodes, etc. as you go deeper into the hierarchy.

Many xml documents though, are just one repeating group, or even none. In the case above, if the document was only ever allowed to have one destination address, then it would be a simple one....with only one repeating group (items).

Using the older xmlPack2 (using xmlOutput stage) is easy, sometimes even easier than any alternative, if the document is simple. ....but if the document is complex, or highly complex by the definition above, you will want to learn the new xml stage. The new xml stage takes maxiumum advantage of xsd's --- but that means that you need to first get yourself familiar with xsd's, what they mean, and what they represent and how they are illustrated and treated within the stage.

There are tons of references to all of these stages here and elsewhere on the web. Spend some time searching thru posts here --- there are tons of references to other documents and links, and also lots of answers right here.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply