How to implement de-normalization concept in Informatica Mappings?

Showing Answers 1 - 9 of 9 Answers

This can be done using str --> exp --> Agg --> exp --> target

say src file:
port1 port2
A1    B1
A1    B2
A1    B3
A2    B1
A2    B2

expected target file

A1 B1 B2 B3
A2 B1 B2

STR is self expalinatory

in exp use

port1 -> I/O
port2 -> I
v_logic_port -> (variable port) IIF(port1 = V_prev_port1,logic_port||'~'||port2,port2)
V_prev_port1(variable port) =  port1
o_port -> (output port) = v_logic_port

o/p from exp

A1 B1
A1 B1 B2
A1 B1 B2 B3
A2 B1
A2 B1 B2

Use AGG to group by on port1 and take last value

o/p from AGG

port1  port2
A1     B1 B2 B3
A2     B1 B2

IN  the next exp use substring and instring to create different ports

port1 = port1 (inp/oupt port) connected to tgt
port2 = port2 (inp/oupt port) not connected to tgt
o_port3 = substr( port2,1,instr(port2,'~',1,1)-1)
o_port4 = substr( port2,instr(port2,'~',1,1),instr(port2,'~',1,2)-1)
o_port5 = substr( port2,instr(port2,'~',1,2),instr(port2,'~',1,3)-1)

opt of exp i.e target

A1;B1;B2;B3
A2;B1;B2

Where ; is the delimiter for the columns

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions