Hi,
I tried CDC for incremental load.but facing a issue.
1. DFT1 , I loaded ALL the records from _CT table to intermediate 'Staging_product' table.
2. Execute SQL task with the command 'select max (__$start_lsn) as max from staging_product' and get the value of
max (__$start_lsn) into a variable called "Var:Max" - datatype:Object.
3. DFT2
3a)Source > OLEDB Source > Query: select * from staging_product where __$start_lsn> ?' and mapped
the parameter to the variable "Max"
3b)Conditional Split > Conditions >
insert --__$operation == 2,
update=__$operation == 4,
delete=__$operation == 1
3c) Insert output > Lookup with Target table > Select productid from productfinal > Then, OLEDB desn > Insert
3d) Update output > OLEDB Command > update productfinal set productname=? where productid=?
3e) Delete output > OLEDB Command > delete from productfinal where productid=?
The issue is, from source it is getting ALL the records from staging table and then splits using Conditional transformation. What i require is,
it should fetch the records only from the Max __$start_lsn,rite?
I really appreciate your help!!