DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
bikan



Group memberships:
Premium Members

Joined: 08 Jun 2006
Posts: 128

Points: 1241

Post Posted: Thu Jul 16, 2009 3:16 am Reply with quote    Back to top    

DataStage® Release: 7x
Job Type: Parallel
OS: Unix
Hi All,

I have a source metadata as
customerid,customername,add1,add2,cost1,cost2
and i have 2 occurence of add1,add2 and cost1,cost2 in my source data file.
My data file is like
101,john,abc street,cde street,abd street,dgf street,30,35,60,70

I want output XML file as
<ExternalXML>
<customerid>101</customerid>
<customername>john</customername>
<address>
<add1>abc street</add1>
<add2>cde street</add2>
</address>
<address>
<add1>abd street</add1>
<add2>dgf street</add2>
</address>
<cost>
<cost1>60</cost1>
<cost2>70</cost2>
</cost>
<cost>
<cost1>30</cost1>
<cost2>35</cost2>
</cost>
</ExternalXML>

I have got reply from ernie saying that i need to use PIVOT stage.
Pivot stage worked for address occurence and i got 2 records out of 1 in source.
but when i tried with two fields having 2 occurences then i got ambiguity in the data with PIVOT stage and output was not correct.

Please tell me what i need to do.

Thanks in advance for your help.

Murari
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours