Implementing Changed Data Capture 1

A common task that is performed by using ODI is to implement Changed Data Capture. In this
practice, students implement Changed Data Capture to detect changes in the source
environment for the interface created earlier in Practice 8-1. You will capture changes of data in the SRC_CITY table in the Oracle Sales Application model. Then, you modify the interface to
process changed records only.
In this practice, you perform change data capture in an interface, using the JKM Oracle Simple knowledge module.
First, you import this knowledge module, and create a model by using this journalizing knowledge module.
Then you create an interface by using the IKM Oracle Incremental Update knowledge module, specifying capture of journalized (changed) data only.
1. Import the JKM Oracle Simple knowledge module.
2. Create a model, Oracle_RDBMS2, specifying this knowledge module in the Journalizing tab.
3. Reverse-engineer the model, verifying the resulting structure.
4. Add the models’ SRC_SALES_PERSON table to CDC, and start the Journal by using the default subscriber SUNOPSIS.
5. Use Data viewer to change data in the table and verify in Journal Data that the data change was captured.
6. Create an interface to process changed data only.




Your Tasks:
1. Import the appropriate JKM in the project.
a. If not open, log in to the WORKREP Work repository with the login name
DEV_ODI_REPO (enter SUPERVISOR for username and SUNOPSIS for password).


b. Click the Projects tab. Expand the Procedure-CRT-TBL > Knowledge Modules node,right-click Journalization (JKM), and select Import Knowledge Modules.

c. Select JKM Oracle Simple to import and click OK. Close Import Report.



d. In the Models tab, create a new model named Oracle _RDBMS2. For Technology,enter: Oracle. Select the logical schema ODI_STAGE. Click the Reverse Engineer tab and set Context to development. Verify the setting, as shown in the following screen.
Click the Journalizing tab.
Note: The table SRC_SALES_PERSON was created in the ODI_STAGE schema in Practice 13-1.




e. In the Knowledge Module menu, select JKM Oracle Simple.Procedure-CRTTBL,as shown in the following screen. Click the Save icon to save your model and then close the tab.

f. Reverse-engineer the model Oracle_RDBMS2. Expand this model and verify its structure as follows.


2. Set up the CDC Infrastructure. You will start the CDC on the SRC_SALES_PERSON table in the Oracle_RDBMS2 model.
a. To add the table to CDC, expand the Oracle_RDBMS2 model, right-click the SRC_SALES_PERSON table, and select Change Data Capture > Add to CDC. Click Yes to confirm.



b. Click the Refresh icon. The small yellow clock icon is added to the table . Right-click the SRC_SALES_PERSON table again and select
Changed Data Capture > Start Journal.

c. In this practice, you use the default subscriber SUNOPSIS. For that reason, you do not have to add another subscriber. Click OK to confirm that your subscriber is SUNOPSIS. In the Information window, click OK again. Wait several seconds, then click Refresh and verify that the tiny clock icon at the SRC_SALES_PERSON table is green now . This means that your journal has started properly.


d. Click the ODI Operator icon to open the Operator. Click Refresh. Select All Executions and verify that the SRC_SALES_PERSON session executed successfully.

3. View the data and the changed data.
a. In the Designer window, open the Models tab. Right-click the SRC_SALES_PERSON datastore and select Data.


b. Select the row with SALES_PERSON_ID = 11. Change the value of the LASTNAME column to “Anderson”. Similarly, select the row with SALES_PERSON_ID = 51, and then change the value to “Smith”. Save your changes and close the tab.

c. Right-click the table again and select View Data. Scroll down, and verify that the rows are modified. Close the tab.



d. To verify that your changed data is captured, right-click SRC_SALES_PERSON, and select Change Data Capture > Journal Data. Find the captured changed records in the journal data. Close the tab.




4. Create an interface that processes captured data changes. The interface loads the TRG_SALES_PERSON_CDC datastore in the Oracle_RDBMS1 model with the content of the
SRC_ SALES_PERSON table from the Oracle_RDBMS2 model. The purpose of this interface is to process and load only changed data.
a. First you need to add one more knowledge module. In ODI Designer, click the Projects tab, and then expand the Export-FF-RT project. Import the new Knowledge Module:
IKM Oracle Incremental Update. Close the report.

No comments:

Post a Comment