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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ptremblay
Contributor
Contributor

How to accomplish Excel "Transpose" in TOS - Java?

Bonjour,
I thought it would be simple but it is not really easy.
I tried to reproduce what I've found in the forum but due to lack of details I'm not able to do what is says in: http://www.talendforge.org/forum/viewtopic.php?pid=16365
I simply would like to transpose the data like:
h1;h2;h3
val1a;val1b;val1c
val2a;val2b;val2c
valNa;valNb;valNc
into
h1;val1a;val2a;valNa
h2;val1b;val2b;valNb
h3;val1c;val2c;valNc
I'm using the Java engine so tPivotToRows is not available to me. Is there an external component that I could download to accomplish this easily?
Thanks for your help.
PM
Labels (3)
2 Replies
Anonymous
Not applicable

Hi,
1) Use tDenormalize with 3 input fields (columns)
2) Use tmap to concatenate the 3 output fields to merge to one output from tmap.
row2.f1 + "~" + row2.f2 + "~" +row2.f3
3) use tnormalise taking in the one field from the tmap and a separater of "~"
4) gives you :-
h1,val1a,val2a,valNa
h2, val1b, val2b, valNb
h3, val1c, val2c, valNc
HTH
Anonymous
Not applicable

Thanks that helps a lot !!