Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

[resolved] row to column transformation

Hi,
Can anyone help me to do this row to column transformation:
Input file:
Col_A Col_B Col_C
1 2 3
4 5 6
7 8 9

Output file:
Col_A Col_B Col_C
1 4 7
2 5 8
3 6 9

I have tried with lots of components but i am not able to do that.
Thanks for your help !.
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,
Thanks for your answer AchyuthB. tPivotOutPutDelimited would help me but it process only one column.
I found the tTurnRow unofficial component and it do exactly that I want.
Best regards
andrelaurent

View solution in original post

6 Replies
Anonymous
Not applicable

Hi
Here I show a demo job to achieve the request,
in.csv:
1;2;3
4;5;6
7;8;9
on tJavarow_1:
1;2;3
4;5;6
7;8;9

on tJavaRow_2:
globalMap.put("c1", input_row.line);

on tJavaRow_3:
globalMap.put("c1", input_row.line);

result:
Starting job forum16973 at 20:07 25/07/2011.
connecting to socket on port 3400
connected
.----.
|tLogRow_1|
|=--=|
|line|
|=--=|
|1 |
|2 |
|3 |
|4 |
|5 |
|6 |
|7 |
|8 |
|9 |
'----'
.--+--+--.
|tLogRow_2|
|=-+--+-=|
|c1|c2|c3|
|=-+--+-=|
|1 |2 |3 |
|4 |5 |6 |
|7 |8 |9 |
'--+--+--'
disconnected
Job forum16973 ended at 20:07 25/07/2011.

Best regards
Shong
_AnonymousUser
Specialist III
Specialist III
Author

Thanks a lot for your demo Shong.
I will try to adapt it for my needs.
Bests regards.
andrelaurent
_AnonymousUser
Specialist III
Specialist III
Author

Hi shong,
I was able to create your demo job but it looks to have a little error on tJavaRow_3. I think the correct code is:
globalMap.put("c2", input_row.line);

But the result is not that I asked in my first post 0683p000009MA5A.png
I need this output file:
1;4;7
2;5;8
3;6;9
Since yesterday I am trying to adapt your job without success. Could you please help me.
Thanks a lot
andrelaurent
Anonymous
Not applicable

Hi,
tPivotOutPutDelimited might help you.
Please refer the below link for more details.
https://community.talend.com/t5/Design-and-Development/using-date-ranges-in-join-condition-of-a-tmap...
Anonymous
Not applicable

Hi,
Thanks for your answer AchyuthB. tPivotOutPutDelimited would help me but it process only one column.
I found the tTurnRow unofficial component and it do exactly that I want.
Best regards
andrelaurent
Anonymous
Not applicable

Hi,
Thanks for your answer AchyuthB. tPivotOutPutDelimited would help me but it process only one column.
I found the tTurnRow unofficial component and it do exactly that I want.
Best regards
andrelaurent

Hi
Cool, I was wrong to your needs.;(
Best regards
Shong