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



Joined: 06 May 2019
Posts: 4

Points: 35

Post Posted: Wed May 08, 2019 9:04 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
Additional info: Working on Remote Desktop
Hi , I am a newbie to datastage and stuck on this job since yesterday Sad
Can someone help me with this

My data after transforming looks like below:

JobId Status
------------------
7859 Success
7859 Fail
7859 Success
7859 Success


I want my output data to look like:

JobId Success Fail
-------------------------
7859 3 1

The JobId does not differ and is consistent for all the records.

I tried aggregator stage but i am grouping on jobid, status and doing count rows which gives me the below output

JobId Status Count
--------------------------
7859 Success 3
7859 Fail 1

_________________
nikita bandekar
ray.wurlod

Premium Poster
Participant

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

Joined: 23 Oct 2002
Posts: 54535
Location: Sydney, Australia
Points: 295717

Post Posted: Wed May 08, 2019 4:28 pm Reply with quote    Back to top    

Now all you need to do is to pivot the data. A Pivot stage should do it, or you could build the logic in a Transformer stage.

_________________
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
chulett

Premium Poster


since January 2006

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

Joined: 12 Nov 2002
Posts: 43011
Location: Denver, CO
Points: 221947

Post Posted: Wed May 08, 2019 7:14 pm Reply with quote    Back to top    

Right, that would be a "rows to columns" pivot, a.k.a. a vertical pivot.

_________________
-craig

The muffin man is seated at the table in the laboratory of the Utility Muffin Research Kitchen reaching for an oversized chrome spoon
Rate this response:  
Not yet rated
mouthou
Participant



Joined: 04 Jul 2004
Posts: 208

Points: 1991

Post Posted: Mon May 13, 2019 12:42 pm Reply with quote    Back to top    

If you have a Transformer already in the job, you could use that with LOOPING logic inside the Transformer itself and get the count directly for each JobId (if you find Aggregator and Pivoting combination becomes heavy)
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