Page 1 of 1

USING CDC in my project

Posted: Fri Jun 15, 2007 8:48 am
by ashoks99
Hi i have source and target are in oracle,so i have to capture inserts,updates and delets from source and in target i have to load in different tables called current and history tables please help me how to capture them and load in to targets.

Posted: Fri Jun 15, 2007 9:00 am
by samsuf2002
If your job compares old data with the new one then you can create files from source DB like current and previous (current file contains current data and previous contains old data ) now compare these 2 files using CDC which generates codes like inserts --- 1 .update --- 3 and delete as 2 you can refer the docs for CDC.
Later in the transformer you can add column to define which row has updated ,deleted or new inserted depending upon the codes generated....
Remember every time you run the job you need to move current file to previous file and generate new current file for current data from the source table.

Posted: Fri Jun 15, 2007 12:04 pm
by JoshGeorge
Bring in 'source' and 'target' records in the similar partitioned / sorted keys and order to CDC. (It is suggested that you do this in 2 jobs. First one to make 2 datasets with your source and target as noted now). In the next job in one of the CDC stage tabs you can see the current and previous incoming links assigned. Make sure your source dataset link is assigned to current and target dataset link to previous. You have the options to assign keys and codes to identify your delta records in CDC stage. According to the out put codes you can use a filter / switch / transformer and update your target.

Posted: Tue Jun 19, 2007 9:43 am
by keshav0307
if source and target both are in oracle database, then you can do it using join sqls.

if you want to use datastage, then using change data capture you can do it.
read the online manual for it.