Scenario: You have two columns in source table T1, in which the col2 may contain duplicate values.All the duplicate values in col2 of will be transformed as comma separated in the column col2 of target table T2.
Source Table: T1
Target Table: T2
- We have to use the following transformation as below.
First connect a sorter transformation to source and make col1 as key and its order is ascending. After that connect it to an expression transformation.
- In Expression make four new port and give them name as in picture below.
- In concat_val write expression like as describe bellow and send it to an aggregator
- In aggregator group it by col1 and send it to target
- Finally run the session.