- Understand Default Behavior
- Mappings with multiple targets do not follow a defined order of loading data by default. The targets will be loaded in an arbitrary order unless explicitly defined.
- Access the Property Inspector
- Click the background in the logical diagram to deselect objects in the mapping. This will bring up the Property Inspector for the mapping.
- Set Target Load Order
- In the Property Inspector, you can:
- Accept the default target load order.
- Enter a new target load order in the Target Load Order field.
- Default Load Order
- The default load order is automatically computed based on primary key/foreign key relationships between the target datastores in the mapping.
- If you want to change the order, you can modify it, but if the modification conflicts with the primary key/foreign key relationship, a warning will appear when you validate the mapping.
- Adjust Target Load Order Using the Gear Icon
- Hover over or select the Target Load Order field and click the gear icon to open the Target Load Order Dialog.
- The dialog will display all available datastores (and reusable mappings with datastores) that can be targets.
- Rearrange the Order of Processing
- In the Ordered Targets field of the dialog, you can move targets to define the processing order.
- Use the icons on the right to rearrange the order as needed.
- Tip for Foreign Key Relationships
- The target load order is especially useful when there are foreign key (FK) relationships between targets.
- For example, if there are two targets, EMP and DEPT, and EMP.DEPTNO is a foreign key to DEPT.DEPTNO, you must ensure DEPT is loaded first, followed by EMP. Set the target load order to DEPT, EMP to guarantee this.
- Reusable Mappings
- The Target Load Order property also applies to reusable mappings. If a reusable mapping contains a source or target datastore, it can be included in the Target Load Order property of the parent mapping.
Specifying Target Order
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment