Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a input data like this:
Title Value A 5 B 4 C 7 D 10 E 8
And how can I convert my Title column values to multiple column and tag the value to it?
Desired output:
A B C D E 5 4 7 10 8
I tried tDenormalize but got same output like my input, since all title values are unique already to denormalize.
I tried tMap to transform my data, but got like this below:
A B C D E 5 5 5 5 5 4 4 4 4 4 7 7 7 7 7 10 10 10 10 10 8 8 8 8 8
Please help.
I solved this problem by writing custom code using tJavaFlex. I created my desired columns in tJavaFlex (output). Then on main code loop I used if else statement to populate the values based on input rows. I found out that my last row of the tJavaFlex output is accurate with proper values. So, I used tSortrow (created a counter column and incremented it) with desc and used tSampleRow to take the last row.
Above is one approach to solve this problem. If anyone finds better and efficient approach, please share.
I solved this problem by writing custom code using tJavaFlex. I created my desired columns in tJavaFlex (output). Then on main code loop I used if else statement to populate the values based on input rows. I found out that my last row of the tJavaFlex output is accurate with proper values. So, I used tSortrow (created a counter column and incremented it) with desc and used tSampleRow to take the last row.
Above is one approach to solve this problem. If anyone finds better and efficient approach, please share.