Monday, May 28, 2012

Finding Maximum value in the column

Description:
My source and target tables as shown below:

MY SOURCE      MY TARGET
Col_1 Col_2 Col_3
A 0 0
0 B 0
0 0 C
Col_1 Col_2 Col_3
A B C

Solution:
  1. Drag source and taget tables in mapping
  2. Create an Aggregator t/f and connect all ports from Source Qualifier t/f to Aggregator.
  3. In Aggregator t/f, create 3 output ports as shown below:
    1. out_Col1=MAX (Col1)
    2. out_Col2 = MAX (Col2)
    3. out_Col3 =MAX (Col3)
  4. Connect all output ports to target table.
  5. The mapping pipeline as shown above.

3 comments:

Related Posts Plugin for WordPress, Blogger...