Page 1 of 1

Implementing Pivot

Posted: Wed Jan 15, 2014 3:30 am
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,

Posted: Wed Jan 15, 2014 3:45 pm
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?