Implementing Pivot

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
srini.dw
Premium Member
Premium Member
Posts: 186
Joined: Fri Aug 18, 2006 1:59 am
Location: Chennai

Implementing Pivot

Post by srini.dw »

Hi,

Iam trying to do the implementation of Pivot with the help of Sort stage.

Code: Select all

EmployeeID  ArchiveID      Empno  FieldName   DataValue Version DateCreated
11                81        111   First_name  RAM        1       2013-05-31 05:33:32.710                 
22                92        111   First_name  RAM        1       2013-04-16 10:06:32.710 
33                71        111   First_name  RAM        1       2013-05-31 07:40:51.663
Need the output as

Code: Select all

Empno first_name Emp__id   archive_id Version DateCreated
111   RAM        11           81       1       2013-05-31 05:33:32.710             
111   RAM        11           92       1       2013-04-16 10:06:32.710 
111   RAM        33           71       1       2013-05-31 07:40:51.663
The keys which I need to use EmployeeID, ArchiveID, Empno,Version, DateCreated.

My job DataSet -> Sort ->Transformer - >RD -> DataSet

In the sort doing Hash partition by 5 key columns, generating a key change column, sorting keys are all 5 columns.
In Transformer and RD partition is SAME.

Is this approach correct, iam not able to get the correct output.

Any help would be appreciated.


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

Post by ray.wurlod »

That does not seem to me to be a pivot. Can you explain in words exactly what you are trying to accomplish?
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