PIVOT stage question

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
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

PIVOT stage question

Post by Marley777 »

Hi, thanks for reading.

Wondering if someone has tried the following with a PIVOT stage...or can help me with what I'm trying to do?

Have one input record with 6 fields

Field1 Field2 Field3 Field4 Field5 Field6

Need to create 3 records from one input record. Each output record will have two fields.

Record 1
Field1 Field2

Record 2
Field3 Field4

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

Post by ray.wurlod »

I don't believe the Pivot stage supports multiple outputs but, if it did, you have an easy answer.

Otherwise use a Copy stage to distribute the required columns to three independent Pivot stages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

The pivot stage is working for us. Wanted to post the resolution with the hopes of helping otehrs with the same question.

On the "pivot properties" tabe we have "x" and y"

derivations

X - Field1, Field3, Field5
Y - Field2, Field4, Field6

If I read in one record

Field1 Field2 Field3 Field4 Field5 Field6

I get 3 records

Field1 Field2
Field3 Field4
Field5 Field6
Post Reply