USING CDC in my project

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ashoks99
Premium Member
Premium Member
Posts: 5
Joined: Wed Sep 06, 2006 4:26 pm
Location: hyd

USING CDC in my project

Post 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.
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post 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.
hi sam here
JoshGeorge
Participant
Posts: 612
Joined: Thu May 03, 2007 4:59 am
Location: Melbourne

Post 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.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post 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.
Post Reply