Tuesday, September 6, 2016

Change Data Capture - Simple

CDC:
Change Data Capture name itself clearly mentioning that we are capture all the new data which arriving to datastore.

Scenario:
We have a requirement - First we need load all the data which was existing in datastore. 
After that if there is new data arrive to that datastore means we need to capture that data (new data in the sense inserted or updated records) and perform 
operation only on newly capture data.

Simply we can say it as initial/full load and incremental load.

Approach:
Step 1:
Go to model --> go to data store --> right click on data store --> Change Data Capture --> Subscriber -->Subscriber --> Add SUNOPSIS and say ok

To add subscriber we need to have JKM knowledege module to be import into our project.
KM name:  JKM Oracle Simple

[Note: From where we need to import knowledge modules - <installed ODI path>\Oracle\Middleware\Oracle_Home\odi\sdk\xml-reference]

Open model and then go to Journalizing tab and select JKM knowledge module and save it.

[Note: we can add any name but if you don't want change means use SUNOPSIS by default in code you will get subscriber as SUNOPSIS]

Step 2:
Now we need to add datastore to CDC
Right click datastore -- Change Data Capture -- Add to CDC and click on Yes

Step 3:
Now we need to start the Journal
Right click datastore -- Change Data Capture -- Start Journal and select Subscriber and click on OK

Check the operator it started successfully or not.

Step 4:
Create mapping -- Drag and Drop source and target datastores from model
Connect output connector of source datastore to input connector of target datastore
Mention Auto map,

[Note: In this example I am using two KM's those are IKM Oracle incremental Update and CKM Oracle]

This physical is initial load or full load

Now we will one more physical for Incremental load. (It is the new feature available in ODI 12c onwards) 

[Note:If you want to implement in ODI 11g means we need to create two different interfaces]

Go to Physical Tab and click on new physical as mention below
Name them as :
Physical : Initial
Physical1: Incremental

Go to incremental and select source datastore -- go to properties inspector -- go general tab and enable journalized data only check box

Hence Developement Completed !!!


No comments:

Post a Comment