Search code examples
data-warehousetalendbusiness-intelligencetmap

How get output like this using talend


I have the dataset like this dataset

and want out put like this how can I do thatoutputenter image description here Here is sample dataset

ID  COMP_ID CAR_ID  ENGINE  COLOR   CC
1   c1  car3    xyz blue    2500
2   c2  car4    xyz white   1000
3   c1  car6    xyz green   3500
4   c2  car1    xyz black   4500
5   c3  car5    xyz green   4000
6   c1  car2    xyz red 3000
7   c2  car3    xyz gray    1500
8   c3  car4    xyz silver  2000

Solution

  • You can try a tJavaRow something like :

    output_row.foo=input_row.row1+"\n"+input_row.row2;
    

    foo must exist in your Output Schema and row1 and row2 in your Input Schema

    Else, you can concatenate them in a TMap in the same way.