Skip to main content

developerWorks >  Information Management  >  Forums  >  IBM InfoSphere Data Architect  >  developerWorks

IBM Infosphere CDC    Point your RSS reader here for a feed of the latest messages in this thread


Tags for this thread: 

     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
This question is not answered.

Permlink Replies: 3 - Pages: 1 - Last Post: Nov 23, 2009 1:16 PM Last Post By: G-Steffler
TKVSS

Posts: 3
Registered: Nov 05, 2009 04:25:26 AM
IBM Infosphere CDC
Posted: Nov 05, 2009 05:02:47 AM
 
Click to report abuse...   Click to reply to this thread Reply
Hi,

We are using IBM Infosphere CDC for replicating data from Source to target. We have a query in using this tool, i.e. is there any way or option to insert a new row into the target table instead of just overwriting the change.

For e.g:
1. Lets suppose that emp1 and emp2 are the source and target tables.
2. These have columns eno, ename.
3. On first replication process, all the data is moved to target.
4. Now, the data in the existing records is modified like ename is modified from "abc" to "def" in an existing record.
5. When we again run the replication process, the record is getting overwritten with "def" in the target table.

Our requirement is such that a new record should be inserted in the target table with the changes, instead of overwriting the existing record.

Any help or pointers on this would be highly appreciated.

Thanks,
Siva
jwjones

Posts: 1
Registered: Nov 05, 2009 02:52:09 PM
Re: IBM Infosphere CDC
Posted: Nov 05, 2009 03:08:58 PM   in response to: TKVSS in response to: TKVSS's post
 
Click to report abuse...   Click to reply to this thread Reply
Hi Siva,

Your question may be more a factor of the databases and tables involved than it is a factor of CDC. If I correctly understand what you are asking the first question I have to ask you is do you have a primary key on the target that is forcing an update on any existing row for which you have a unique primary key that matches? If you have keys on both source and target then the only way the target database can respond is to update the row because of a key match. If you do not have a key on the target then the updated record from the source would be inserted into the target every time and this could result in duplicate data rows in the target. I hope this makes sense.

Regards, Jerry
--Rob

Posts: 2
Registered: Nov 23, 2009 02:48:44 AM
Re: IBM Infosphere CDC
Posted: Nov 23, 2009 02:53:16 AM   in response to: TKVSS in response to: TKVSS's post
 
Click to report abuse...   Click to reply to this thread Reply
In MC in the table mappings (available via subscription configuration) there is a tab called "Operation".
There you can specify the Row-level operation for a table. In your case you can specify to "Insert Row" for the "On Update" operation.

Hope this helps.
G-Steffler

Posts: 1
Registered: Jun 22, 2009 01:29:30 PM
Re: IBM Infosphere CDC
Posted: Nov 23, 2009 01:16:13 PM   in response to: TKVSS in response to: TKVSS's post
 
Click to report abuse...   Click to reply to this thread Reply
There is an easy way to do this.

By default, CDC uses "Standard Replication" mapping which will replicate like-like.

However, CDC mapping type "Live Audit" will turn all operations (insert, update, delete) into INSERT's on the target.

Note that in your example, you did not list what you wanted done with DELETE operations.
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums