Page 1 of 1

Vertical Pivoting...rows to colums

Posted: Wed May 11, 2011 12:37 pm
by kurapatisrk
Hi Gurus,

Since pivot stage doesn't support vertical pivoting rows to column, how can we implement vertical pivoting?

Example:

Col1 Col2
A 1
A 2
A 3

Output Should be :
Col1 Col2 Col3 Col 4
A 1 2 3

Please suggest. Thanks.

Posted: Wed May 11, 2011 4:20 pm
by chulett
First suggestion will always be to search the forums here, the topic of how to do a "vertical pivot" has been discussed here quite a bit.

Posted: Wed May 11, 2011 4:28 pm
by ray.wurlod
If you have version 8.5 the PXPivot stage can perform vertical pivot.

Posted: Wed May 11, 2011 8:05 pm
by prakashdasika
Use the transformer stage and stage variables with the help of substring function to do it.

Posted: Wed May 11, 2011 11:25 pm
by ray.wurlod
prakashdasika wrote:Use the transformer stage and stage variables with the help of substring function to do it.
Why substring function?
:?

Posted: Wed May 11, 2011 11:48 pm
by vinu.dsx
chulett wrote:First suggestion will always be to search the forums here, the topic of how to do a "vertical pivot" has been discussed here quite a bit.

Posted: Thu May 12, 2011 1:33 am
by prakashdasika
If my input is from a database , where i have to convert multiple rows to columns i can extract all of then in a single row by a sql query and use a transformer with substring or a column import with a schema file defined. :)