You are on page 1of 1

i need n/2 records to one target(t1) and another n/2 records to another target(t2).

You can create an another column(seq) which will be a sequence number and
in expression transformation you can use whether the seq/2 is zero then
direct to target(t1) else direct the records to target(t2).Use router to
redirect the records to the desired tables based on values seq/2 is 0 or 1.

prior to writing to the target you keep counts in an expression. then connect this expression to a router.
The router should have 2 groups
group1 count1 <= n/2 then route it to Target1
group2 count1 > n/2 then route it to Target2

Create a psudo column in source qualifier , over write the select for the source column as
Decode(Mod(rownum,2),1,'odd half', 'even half') , use a router to route the records in two different
targets.

if you want first half of source record in one target and another half in other then you create a seq num
o_seq=o_seq 1
then use aggregator calculate max of seq num
then put router
in one group put condition as
seq<max(seq)/2
and in other one put
seq>max(seq)/2

You might also like