You can use a parmeter variable in mapping.
Login to rate this answer.
Use the lookup transformation on target table and apply the look up condition.
otherwise use
set variable function in an expression transformation or mapping variable.
Login to rate this answer.
Use expression, filter and mapping variable.
Set initial value of mapping variable (eg.$$LOAD_DEPT) to 0.
In expression trans, add an output port V_LOAD_DEPT and assign to SETVARIABLE($$LOAD_DEPT,$$LOAD_DEPT+1)
Pass it to filter trans and add filter condition E_DEPT = V_LOAD_DEPT
The variable value is incremented by 1 each time session is run.
Eg. for the first run, the value will be 1, the filter condition matches Dept value 1 and only passes Dept 1 rows. For second run, it will be 2 and only Dept 2 rows will be loaded. (and similarly for future runs).

3 Users have rated as useful.
Login to rate this answer.
Write the following query in to the source qualifier,
select empno, ename, sal, deptno from emp_src
where deptno > (select max(deptno) from emp_trg);
the query returns only the department records from source, which are not yet loaded in to the target.
then you can use the rank(any other approach) transformation to get only the minimum department records. and then load to the target.
Cheers,
Nagaraju Puppala

2 Users have rated as useful.
Login to rate this answer.
would go with sudhir24s answer.
@Nagaraju Puppala: The src query will not work when the mapping is executing for the first time, and there is no data in the tgt.
Login to rate this answer.
Put this query in Source Qualifier
select empno, ename, sal, deptno from emp_src
where deptno not in (select deptno from emp_trg);
Then connect it to Rank Transformation
In the properties, Select Top 1 Row...
From Rank.. connect to target Table.. 1 Row gets inserted every time when the session runs.
Cheers
Dileep
Login to rate this answer.
MAHESH MANAM
Answered On : Sep 27th, 2012
We can solve this issue by the following types:
First, we can create a mapping parameter and run the mapping in each time give the parameter value according to your requirement.
Second, we can create a reusable expression and in that create a variable and assign value as 0 and increases by1.It pass to filter make condition on based on variable.If run in second time the value already stored in that variable and increase it by 1.
Third, we can create 3 different mappings and sessions in a single workflow and connect all these into start.Create workflow parameter and assign value based on requirement.

1 User has rated as useful.
Login to rate this answer.