ODI Hnads on - Working With Changed Data Capture

Embed Size (px)

DESCRIPTION

ODI

Citation preview

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 1 10/29/2013

    ODI Working with changed data capture

    Background.

    Like DAC , ODI has a concept called changed data capture. Below the process to setup this changed data

    capture in OID.

    1.Import the JKM Oracle Simple Knowledge module. Right-click on the Journalization (JKM) and click on

    Import Knowledge Modules..

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

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 2 10/29/2013

    3. Set the CDC Infrastructure on the table you want. Here I am going to use SRC_SALES_PERSON Table.

    To Add the table to CDW, expand the model (Ex. Oracle_RDBMS2), right-click the SRC_SALES_PERSON

    table and select Changed Data Capture > Add to CDC. Click Yes to Confirm.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 3 10/29/2013

    4. Click the Refresh button on Designer tab. The small Yellow clock icon is added to he table

    SRC_SALES_PERSON table.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 4 10/29/2013

    5. Right-click the SRC_SALES_PERSON table again and select Change Data Capture > Start Journal.

    6. Here in the Select Your Subscriber(s) window, I am using default subscriber SUNOPSIS.

    Consequently, you do not have to add another subscriber. Click OK to conform your subscriber. In the

    Information window click OK.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 5 10/29/2013

    7. Wait for few seconds and click on Refresh button in Designer tab and then verify that the tiny clock

    icon on the SRC_SALES_PERSON table is green now. This means that your journal has started properly.

    8. Open Operator Navigator. Click refresh. Select All executions and verify that the SRC_SALES PERSON

    session executed successfully.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 6 10/29/2013

    9. In order to test the change capture I am going to modify the data in the source table

    SRC_SALES_PERSON table. Changing sales person (Id = 11) last name from Anderson to Andersen.

    Similarly person _id 51 from Nagata to Smit

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 7 10/29/2013

    10. Right-click the SRC_SALES_PERSON table again and select View Data. Scrow down and verify the row

    are modified Close the tab.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 8 10/29/2013

    11. Now verify either your changed data has been captured or not. To do this , Right-click on

    SRC_SALES_PERSON table and select Changed Data Capture > Journal Data. Find the changed records in

    the Journal data. Close the tab.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 9 10/29/2013

    12. Now we have to create a new interface that process captured data changes. The New interface will

    load the target table ex. TRG_SALES_PERSON_CDC with the content of SRC_SALES_PERSON. This

    process is only to load the changed data in this table.

    Before you create a new interface we have to impart add a new knowledge module IKM Oracle

    Incremental Update

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 10 10/29/2013

    13. Now I am going to create a one more target data store (logical table object) to store only changed

    data.

    Change the name to TRG_SALES_PERSON_CDC and save the changes.

    Now I am going to delete all the existed data in this TRG_SALES_PERSON_CDC table.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 11 10/29/2013

    14. Now create new interface.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 12 10/29/2013

    15. Provide the interface name and context details.

    16. Click the mapping tab. Then click the Module tab in the designer. Add TRG_SALES_PERSON_CDC

    data store from the tree view of Oracle_RDBMS1 to target datastore zone.

    17. Drag the SRC_SALES_PERSON table from Oracle_RDBMS1 to the sources zone. Click Yes to perform

    automatic mapping. Save your interface.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 13 10/29/2013

    18. Right-click the caption of the source datastore and select Data. Scroll down to preview the current

    source data. Close the data Editor window.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 14 10/29/2013

    19. Click the Flow tab, click the Staging Area caption, and verify that the selected IKM IS IKM Oracle

    Incremental Update. Select Distinct Rows.

    20. Now you have to modify this interface to process only the changed data. Click the Mapping tab. Click

    the source datastore. In the source Properties section of the Property Inspector, select the Journalized

    Data Only check box.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 15 10/29/2013

    21. Now there is a filter added to the source.

    22. Click on the Filter and check the Filter condition in the properties box

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 16 10/29/2013

    23. Check the new source data set by right click on the sources datastore . Now you will see only the

    changed data. Close the data window.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 17 10/29/2013

    24. Save your interface and close the tab. On the Projects tab, execute the interface to process only

    journalized or changed records. In the execute and Information windows, click OK.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 18 10/29/2013

    26. Verify the execution results. Open Operator Navigator. Click Refresh. Expand the All Execution node

    and verify that your session, INT_SALES_PERSON_CDC, executed successfully.

    27. View the data in the TRG_SALES_PERSON_CDC datastore and verify that only two changed rows are

    inserted in the target datastore.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 19 10/29/2013

    Removing CDC

    To Drop and remove the CDC, follow the below process.

    1.On the Model tab, in the Oracle_RDBMS2 model, right click the SRC_SALES_PERSON datastore and

    select Drop Journal. Click OK in the Execution window click ok in the information window.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 20 10/29/2013

    2. Right-click the SRC_SALES_PERSON datastore again, and then select Remove from CDC. Click Yes to

    conform removing the datastore from CDC.