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



Joined: 18 Dec 2014
Posts: 3

Points: 28

Post Posted: Thu Dec 18, 2014 7:45 am Reply with quote    Back to top    

DataStage® Release: 9x
Job Type: Parallel
OS: Unix
I am trying to do something similar to this post... find a way in DataStage to do the following:

Output from an ETL job creates a file where each row looks as:

ID, date period, Type1, Totala, Totalb
ID, date period, Type2, Totala, Totalb
ID, date period, Type3, Totala, Totalb


I like to have each row to look like this:


ID, date period, Type1, Totala, Totalb, Type2, Totala, Totalb, Type3....


I am extremely new with DataStage so reaching out to the Gurus here. Help is really really appreciated.
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 43045
Location: Denver, CO
Points: 222248

Post Posted: Thu Dec 18, 2014 8:30 am Reply with quote    Back to top    

Welcome aboard... a couple of things.

First, I've put you into your own post and linked back to the 'similar' thing you are trying to do. Secondly, this meant I had to guess at some things, can you clarify for us:

1) Your DataStage version
2) Your server Operating System

Thanks.

I'd also be curious what you've tried, any kind of pivoting that the post you found mentioned?

_________________
-craig

"May the bridges I burn light my way forward"
Rate this response:  
Not yet rated
toscajo1103
Participant



Joined: 18 Dec 2014
Posts: 3

Points: 28

Post Posted: Thu Dec 18, 2014 2:37 pm Reply with quote    Back to top    

Thanks for setting me up.

DataStage version is 8.0
Windows
Linux\DB2

I tried playing with pivot transformer. Not sure if its this version but it doesn't seem to work.
Rate this response:  
Not yet rated
ray.wurlod

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup, Server to Parallel Transition Group

Joined: 23 Oct 2002
Posts: 54549
Location: Sydney, Australia
Points: 295797

Post Posted: Thu Dec 18, 2014 3:11 pm Reply with quote    Back to top    

Looks like you just want to accumulate source columns into a single row until the key changes?

Is the number of source rows per key constant or variable?

_________________
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Rate this response:  
Not yet rated
toscajo1103
Participant



Joined: 18 Dec 2014
Posts: 3

Points: 28

Post Posted: Fri Dec 19, 2014 7:49 am Reply with quote    Back to top    

If you are saying source meaning 'Type' then yes, each row has multiple Types. Starting out with 10 types.

So it would be constant initially. As Types get added this too will need to increase going forward.
Rate this response:  
Not yet rated
priyadarshikunal



Group memberships:
Premium Members

Joined: 01 Mar 2007
Posts: 1735
Location: Troy, MI
Points: 9319

Post Posted: Tue Dec 23, 2014 8:07 am Reply with quote    Back to top    

It can be achieved in newer versions with vertical pivot or looping but there functionality is not available in 8.0. Do a search on vertical pivot and look for some answers for pre 8.5 version. Should also be achievable with stage variables but a little tricky to identify the last record.

_________________
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. Wink
Rate this response:  
Not yet rated
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