Wednesday, 26 November 2014

How to add same column data with separated by special character in informatica?

Suppose the source table has values like this
10 X
10 Y
10 Z
20 A
20 B
20 C
30 P
30 Q
30 R
And the target should be
10 X*Y*Z
20 A*B*C
30 P*Q*R 

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.


Thanks
Hari

No comments:

Post a Comment