vertical pivot is hanging

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
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

vertical pivot is hanging

Post by raji33 »

Hi,

I have i/p as

id date gp code amt
1 1992-01-01 US abc 123
1 1992-01-01 US abc 124
1 1992-02-01 US abc 234
1 1992-03-01 US abc 245

Expected o/p

id gp code jan feb march april june july aug sept oct nov dec
1 US abc 247 234 245


i used pivot stage and type as vertical pivot . group by by id,gp,code and pivot column amt, array size 12

i am getting o/p as
id gp code jan feb march april june july aug sept oct nov dec
1 US abc 123 124 234

not sure where i am going wrong and also iam sending sorted data to pivot stage . Any suggestions please.

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Look at your data. You have two entries for January. Use a Remove Duplicates stage to keep only the last in each group, if that's what you need.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

Thanks ray for quick response.

ya there are two entries for jan and i need both the records to be aggregated as single record . i tried using agrregator stage before pivot stage. But the job just hangs and is not proceeding further after aggregator stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Did you specify "Sort" mode for the Aggregator stage, since your data are already sorted by the grouping key?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

yes i did. its going out of aggregator stage but not comming out of pivot. Its hanging there.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How much data are we talking about? How long did you wait before you declared that it was hung?
-craig

"You can never have too many knives" -- Logan Nine Fingers
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

its not huge data. I am testing on only 12 rows, I have waited for 20 mints.
raji33
Premium Member
Premium Member
Posts: 151
Joined: Thu Sep 23, 2010 9:21 pm
Location: NJ

Post by raji33 »

Any alternate solution/suggestions/ideas to get my expected o/p.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For starters, don't push. Your last two posts were at 10:48pm and 1:22am my time. DSXchange is an all volunteer site whose members post if and when they can, at the same time being under no obligation to do so.

If you effect the pivot using a Transformer stage, does it still hang?

How, precisely, are you configuring the PXPivot 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.
Post Reply