Journalizing Infrastructure Details Setting up Journalizing

Working with Changed Data Capture 7-9

7.3.3 Using Changed Data: Consistent Set Journalizing

Using Changed data in Consistent journalizing is similar to simple journalizing for interface design. It requires extra steps before and after processing the changed data in the interfaces in order to enforce changes consistently within the set. These operations can be performed either manually from the context menu of the journalized model or automated with packages. Operations Before Using the Changed Data The following operations should be undertaken before using the changed data when using consistent set journalizing: ■ Extend Window : The Consistency Window is a range of available changes in all the tables of the consistency set for which the insertupdatedelete are possible without violating referential integrity. The extend window operation recomputes this window to take into account new changes captured since the latest Extend Window operation. This operation is implemented using a package step with the Journalizing Model Type. This operation can be scheduled separately from other journalizing operations. ■ Lock Subscribers : Although the extend window is applied to the entire consistency set, subscribers consume the changes separately. This operation performs a subscribers specific snapshot of the changes in the consistency window. This snapshot includes all the changes within the consistency window that have not been consumed yet by the subscribers. This operation is implemented using a package step with the Journalizing Model Type. It should be always performed before the first interface using changes captured for the subscribers. Designing Interfaces The changed data in consistent set journalizing are also processed using interfaces sequenced into packages. Designing interfaces when using consistent set journalizing is similar to simple journalizing, except for the following differences: ■ The changes taken into account by the interface that is filtered with JRN_FLAG, JRN_DATE and JRN_SUBSCRIBER are not automatically purged at the end of the interface. They can be reused by subsequent interfaces. The unlock subscriber and purge journal operations described below are required to commit consumption of these changes, and remove useless entries from the journal respectively. ■ In consistent mode, the JRN_DATE column should not be used in the journalizing filter. Using this timestamp to filter the changes consumed does not entirely ensure consistency in these changes. Operations after Using the Changed Data After using the changed data, the following operations should be performed: ■ Unlock Subscribers : This operation commits the use of the changes that where locked during the Lock Subscribers operations for the subscribers. It should be processed only after all the changes for the subscribers have been processed. This operation is implemented using a package step with the Journalizing Model Type. It should be always performed after the last interface using changes captured for the subscribers. If the changes need to be processed again for example, in case of an error, this operation should not be performed. 7-10 Oracle Fusion Middleware Developers Guide for Oracle Data Integrator ■ Purge Journal : After all subscribers have consumed the changes they have subscribed to, entries still remain in the journalizing tables and should be deleted. This is performed by the Purge Journal operation. This operation is implemented using a package step with the Journalizing Model Type. This operation can be scheduled separately from the other journalizing operations. Automate Consistent Set CDC Operations To automate the consistent set CDC usage, you can use a package performing these operations. 1. Create a new package.

2. Drag and drop from the Models tree the journalized model into the package

Diagram tab. A new package step appears. 3. Double-Click the step icon in the package diagram. The properties inspector for this step opens.

4. In the Type list, select Journalizing ModelDatastore.

5. Check the consistent set operations you want to perform.

6. If you checked the Lock Subscriber or Unlock Subscriber operations, enter the

first subscriber in the subscriber field, and click the Add button to add it to the Subscribers list. Repeat this operation for all the subscribers you want to lock or unlock.

7. From the File menu, select Save All.

7.3.4 Journalizing Tools

Oracle Data Integrator provides a set of tools that can be used in journalizing to refresh information on the captured changes or trigger other processes: ■ OdiWaitForData waits for a number of rows in a table or a set of tables. ■ OdiWaitForLogData waits for a certain number of modifications to occur on a journalized table or a list of journalized tables. This tool calls OdiRefreshJournalCount to perform the count of new changes captured. ■ OdiWaitForTable waits for a table to be created and populated with a pre-determined number of rows. ■ OdiRetrieveJournalData retrieves the journalized events for a given table list or CDC set for a specified journalizing subscriber. Calling this tool is required if using Database-Specific Processes to load journalizing tables. This tool needs to be used with specific Knowledge Modules. See the Knowledge Module description for more information. Note: It is possible to perform an Extend Window or Purge Journal on a datastore. These operations process changes for tables that are in the same consistency set at different frequencies. These options should be used carefully, as consistency for the changes may be no longer maintained at the consistency set level Note: Only one datastore per dataset can have the Journalized Data Only option checked.