Saturday, March 29, 2008

Mapping Scenario

Hi Friends,
This is another scenario similar to the previous one.
Suppose the source table has values like this
10 A
10 B
10 C
20 X
20 Y
20 Z
30 D
30 E
30 F

And the target should be
10 A*B*C
20 X*Y*Z
30 D*E*F

How will you do the mapping?

Answer:This can be done using an expression transf and Aggregator transf.
In expression transf declare 2 variables ID_V and NAME_V
NAME_V
IIF(ID_V=ID,NAME_V ' * ' NAME,NAME)
ID_V
IIF(ID_V!=ID,ID,ID_V)
NOW pass the output ports to aggregator GROUP BY ID and connect to target.
This will work..

1 comment:

  1. Thanks Tanya..

    Please help with the below questions?

    My source is as below:

    From_Month To_Month Qty
    ---------- ------- ----
    Jan Mar 600

    I want the target as


    Month Qty
    ----- ---
    Jan 200

    Feb 200

    March 200

    and the condition is that the difference of Frm_ and To_ months should not be greater that 12.

    Can u please tell me how we can implement this using Informatica?
    Is it using Normalizer tranformati0on?

    ReplyDelete