XML output Stage repetition columns

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

XML output Stage repetition columns

Post by ag_ram »

Hi,

I need a XML like this below.
<GROUP NAME="DPT0001 Users">
<USER>1480000</USER>
<USER>1480003</USER>

</GROUP>

<GROUP NAME="DPT0002 Users">
<USER>1480001</USER>
<USER>1480002</USER>
<USER>1480005</USER>
</GROUP>
.
.

Also Please note number of Group name (ex:DPT001 Users) records and USER records can vary.

My input file will be like

Grp_name User
DPT0001 1480000
DPT0001 1480003
DPT0002 1480001
DPT0002 1480002
DPT0002 1480005
.
.
.


I am using the following description in the XML output stage (Ds Verson 7.5.2)

/GROUP/@NAME
/GROUP/USER/@VALUE

(I have made Grp_name is the key column)


I am not able to get the expected output please help...I am getting only one user inside, Please help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Typically one would make the 'lowest level' the repetition key, so try marking the User instead of the Group as such.
-craig

"You can never have too many knives" -- Logan Nine Fingers
prasad111
Premium Member
Premium Member
Posts: 173
Joined: Fri May 19, 2006 10:53 am

Post by prasad111 »

As you are using PX, make sure you sort the data based on the NAME column and send it XML output stage, so that it can group it properly.....
Post Reply