Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am looking for a way to convert column's value to row value.
This is an input sample.
(In the actual case, I have these data inside a database)
And this is the expected output.
I wanted to move the value from repeating column(w/ difference seq no.) to the corresponding column.
I heard about tUnpivotRow component, but I'm using Talend Cloud Studio (v 7.3), but I couldn't find pivot component.
Can anyone show me the JobDesign(screenshot) for achieving the expected output?
Here is the two method I tried.
1) Using tUnpivot
Job Design and Result
vs
Here, there are a few problems...
1) the column header (id, key1, value1) becomes a part of a row value....
2) the repeating column header (key2, value2, key3 ....) is still there
3)
1.1 DBInput Schema
1.2 tUnpivotRow's Schema
1.3 tMap
2) tNormalize
Job Design and Result
Here, there are few problems
1) 'key' and 'value' is not separated into a different column
2) manual mapping is needed == inflexible
3) id's auto increment is not working....
1.1 DBInput's Schema
1.2 tMap
1.3 tNormalize's Schema
Thank you
I downloaded tUnpivot component from Talend exchange and tried to install the component, but nothing shows up in the palette.
*I am using Talend Cloud Studio v.7.3, but in the component detail page, it stated the compatibility to be up to v6.2...
Was this a compatibility problem??
I did restart once, but still the component doesn't show up.
Preference>Talend>Components
So you mean using tMap?? Do I need tSplitRow or any other components?
Can you show me the screenshot of the job design?
I have tried a similar way before but it didn't work.
Can you help me improve this?
For you reference this is my input.
and this is my expected output.
Thanks
I saw tUnpivotRow in the palette so I tried using it here.
Here is the two method I tried. But neither works well...
1) Using tUnpivot
Job Design and Result
vs
Here, there are a few problems...
1) the column header (id, key1, value1) becomes a part of a row value....
2) the repeating column header (key2, value2, key3 ....) is still there
3)
1.1 DBInput Schema
1.2 tUnpivotRow's Schema
1.3 tMap
2) tNormalize
Job Design and Result
Here, there are few problems
1) 'key' and 'value' is not separated into a different column
2) manual mapping is needed == inflexible
3) id's auto increment is not working....
1.1 DBInput's Schema
1.2 tMap
1.3 tNormalize's Schema
Here I specified the ID column as key
Here's the run result,,,
however the column name only becomes a row value
I wanted to move the value 'k2'~'k7' and 'v2'~'v7' under the column 'key1' and 'value1' respectively
and remove the other columns (eg. value2, key2 ...)
Expected Result
I feel that additional mapping might be needed but I'm not sure how I could do that.
For you reference, I modified the row value a bit here to avoid confusion
Input