XML Regrouping Query

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
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

XML Regrouping Query

Post by sarathchandrakt »

Hi,

I have a job where I take an XML as input to XML Stage, Send it to multiple Transform Stages, Modify Data and then Compose Data.

As of now, I got till here,

Step 1. Take Input XML in XML stage, Parse the data into multiple Transform Stages (If there is 5 levels of Data, I divided the data into 5 individual outputs)

Step 2. Applied required transformation

Step 3. By using Join/Lookup, starting from the Leaf Child Node, I joined all the parents one by one and I was sucessful in getting all the data into one Sequential File.

Step 4. Trying to Compose the data using XML Stage. This is where I am stuck. Till now i have done composing in many jobs where we had only one parent and one child. Now as we have multiple parents and Miltiple childs, i am not able to regroup the data.

Job Desgin:

External Source Stage->XML Stage->Multiple Transformers->Join/Lookup from child node to parent to bring all data into one line->XML Stage to output data to an XML file

Please help me in regrouping data when we have multiple levels of data.

Example:

Lets say this is my hirarchy

A(Level 1)
--B(Level 2)
--C(Level 2)
----D(Level 3)
----E(Level 3)
------F(Level 4)
------G(Level 4)
------H(Level 4)
----I(Level 3)
------J(Level 4)
------K(Level 4)
sarathchandrakt
Participant
Posts: 50
Joined: Fri Aug 29, 2014 1:32 pm
Location: Mumbai

Post by sarathchandrakt »

I got the solution. We can add multiple regroups. The scope of the regroup should be the parent group instead of "top"
Post Reply