Wednesday, August 16, 2017

How specify order of loading target tables in ODI 12c?

Specifying Target Order load


Scenario:

Target Order is useful when a mapping has multiple targets and there are foreign key (FK) relationships between the targets. 

For example, suppose a mapping has two targets called EMPLOYEES and DEPARTMENTS, and EMPLOYEES.DEPTID is a FK to DEPARTMENTS.DEPTID. If the source data contains information about the employee and the department, the information about the department (DEPARTMENTS) must be loaded first before any rows about the employee can be loaded (EMPLOYEES). To ensure this happens, the target load order should be set to DEPARTMENTS, EMPLOYEES

Approach:

Mappings with multiple targets do not, by default, follow a defined order of loading data to targets. You can define a partial or complete order by using the Target Load Order property. Targets which you do not explicitly assign an order will be loaded in an arbitrary order by ODI.

Note:
Target load order also applies to reusable mappings. If a reusable mapping contains a source or a target datastore, you can include the reusable mapping component in the target load order property of the parent mapping.

The order of processing multiple targets can be set in the Target Load Order property of the mapping:

1. Click the background in the logical diagram to deselect objects in the mapping. The property inspector displays the properties for the mapping.

2. In the property inspector, enter a target load order in the Target Load Order field:

Select or hover over the Target Load Order field and click the gear icon to open the Target Load Order Dialog. This dialog displays all available datastores (and reusable mappings containing datastores) that can be targets, allowing you to move one or more to the Ordered Targets field. In the Ordered Targets field, use the icons on the right to rearrange the order of processing.