Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
krishu
Contributor II
Contributor II

transpose Row to Column but not same as tpivottocolumns

Hi Team

I have a requirement, where i need to transpose rows to columns but its not similar to using tpivot component. I tried using tpivot, normalize, tdenormalize but nothing worked! Providing the sample input and expected output.

Attached the screenshot and also sample data below:

Sample Input Data

--------------------------------------

|Prod_Type |Prod_No |   Prod_Price|

--------------------------------------

| 1     |123456 |  24.5    |

| 1     |234567 |  234.6   |

| 1     |345678 |  10     |

| 1     |2412421 |   1000   |

| 1     |7689657 |   345    |

| 1     |456891 |  635.61   |

| 1     |6578709 |   450.11  |

| 1     |999876 |  222    |

Expected Out:

--------------------------------------------------------------------------------------------------------------------------------------------------

S.No| Prod_No_1 |Prod_Price_1 |Prod_No_2 |Prod_Price_2 |Prod_No_3 |Prod_Price_3 |Prod_No_4 |Prod_Price_4 |Prod_No_5 |Prod_Price_5

--------------------------------------------------------------------------------------------------------------------------------------------------

1 | 123456 | 24.5 | 234567 | 234.6   |345678 | 10 | 2412421 | 1000 | 7689657 | 345

2 | 456891 |  635.61   | 6578709 |  450.11   | 999876 |  222 |     |        |      |

Any ideas or approaches to achieve this!

Thanks & Regards

Krishu

Labels (4)
2 Replies
Anonymous
Not applicable

Hello,

It seems you are trying to group Prod_Type with the same type. Please have a look at tSortRow and tUniqRow components to achieve your goal.

Best regards

Sabrina

krishu
Contributor II
Contributor II
Author

Hi Sabrina

 

Thanks for the reply!. Am not sure how tSortRow and tUniqRow helps to achieve this!?

 

Regards

Krishu