Source:
Ename
|
EmpNo
|
Stev
|
100
|
methew
|
100
|
John
|
101
|
Tom
|
101
|
Target:
Ename
|
EmpNo
|
Stev
methew
|
100
|
John tom
|
101
|
Approach1: Using Dynamic Lookup on Target table:
If record doesn’t exist
do insert in target .If it is already exist then get corresponding Ename vale
from lookup and concat in expression
with current Ename value then update the target Ename column using update
strategy.
Approch2: Using Var port :
Sort the data in sq based on EmpNo column then Use expression to
store previous record information using Var port after that use router to
insert a record if it is first time if it is already inserted then update Ename
with concat value of prev name and
current name value then update in target.
Implementation Procedure:
2)Expression variable Approach:
a)Mapping overview:
Write a sql query in source qualifier transformation
SELECT EMP.NO, EMP.NAME FROM EMP
order by EMP.NO
b)Expression transformation ports:
Conditions:
V1=iif(NO !=
no_v,'i','u' )
Prename= iif(NO=no_v,concat(concat1,concat(',',NAME)),NAME)
c)Router transformations conditions:
No comments:
Post a Comment