Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Talend experts
Is possible to transpose one single column into multiple rows ?
So I have these values , all in the same column and I would like to be able to transpose them into 20 new rows so I can use the values later on in a Tmap
OK, these values can be stored individually if you wish. You can use the globalMap for this. How would you want to retrieve or use these values? With the globalMap you can use key/value pairs. So is there a "key" column that you will know the value of?
If so, you can use a tJavaFlex and store the values for each row using code similar to this....
globalMap.put(row1.columnKey, row1.columnValue);
To retrieve the values later, you will need to know the keys though. For example....
((String)globalMap.get("myknownkeyvalue"))
....for a String value.
You'll need to give an example of how you would like to do this. For example, row 1 in your example data holds ";1;2;". Do you want this to be turned into.....
.....or .....
Or do you simply want to copy the whole of the dataset, but only this column of the data set?
Pretty much as you said in the last part
To be fair , the only thing I really need is to store the values from the column individually
so I can use them later , so I thought that the easiest way to do it would be to store each value in a different row so I can use them as value1=;1;2 , value2=;A;B;C;D;E;F;G;H;Z , value3=;A;N;E etc later on in the tmap
OK, these values can be stored individually if you wish. You can use the globalMap for this. How would you want to retrieve or use these values? With the globalMap you can use key/value pairs. So is there a "key" column that you will know the value of?
If so, you can use a tJavaFlex and store the values for each row using code similar to this....
globalMap.put(row1.columnKey, row1.columnValue);
To retrieve the values later, you will need to know the keys though. For example....
((String)globalMap.get("myknownkeyvalue"))
....for a String value.
Thanks!!! It worked
Thank you very much 🙂
Not a problem 😉