Scenarios

Separating First Name and Last Name in Informatica

Consider Source table
EID,ENAME
10,Lionel Messi
20,Diego Maradona
The Target file will be like below
EID,F_NAME,L_NAME
10,Lionel,Messi
20,Diego,Maradona
Solution:
  • Create a source file with above source structure.
  • Create target file in relation table with the above target table structure.
  • Drag both source and target in to the mapping designer.

  • Create an expression transformation, connect all ports from source qualifier to expression. 
  • In the expression create two output ports, F_NAME, L_NAME
  • Write expressions on two output ports
  • F_NAME=SUBSTR(ENAME,1,INSTR(ENAME,' ',1,1))
  • L_NAME=SUBSTR(ENAME,INSTR(ENAME,' ',1,1),length(ENAME)) 

  • Connect ports from expression to target. 
Powered by Blogger.