官术网_书友最值得收藏!

Managing constraints – the target load plan

While you work on multiple mappings in a complex scenario, situations might demand that you put multiple data flows in a single mapping in order to justify the performance and the complexity. A sample mapping depicting the preceding statement is shown in the following screenshot:

Managing constraints – the target load plan

If you execute the mapping, the session might fail because of the primary key and foreign key violation. As the Employee and Department tables have dependencies on each other, when you run the mapping containing both the flows, the process might fail if the data violates the dependency.

To avoid the issue, Informatica PowerCenter contains a utility called the target load plan—how do you plan to load the data into multiple targets in a mapping? We can load the data in a particular sequence in multiple targets in a mapping in order to avoid failure due to constraints.

Consider that the EMPLOYEES table data depends on the DEPARTEMNTS data because of the primary key and foreign key constraints. So, to satisfy the referential integrity, the DEPARTMENTS table should be loaded first. The target load order is useful when you wish to handle referential integrity while inserting, deleting, or updating data in tables that have the primary key and foreign key relationships.

To set the target load plan in a mapping, perform the following process:

  1. In the designer, navigate to Tools | Mapping Designer | Mapping | Target Load Plan, as shown in the following screenshot:
    Managing constraints – the target load plan
  2. New window will pop up, as shown in the following screenshot:
    Managing constraints – the target load plan

To set the target load plan, just move the target load group using the arrow provided in the window. To load the DEPARTMENTS table before the EMPLOYEES table, select SQ_DEPARTMENTS and click on the up arrow, as shown in the preceding screenshot.

This will make the DEPARTMENTS table load before the EMPLOYEES table is loaded, and we can avoid failure.

When we use the target load plan, Informatica PowerCenter actually restricts the extraction of the data from the source qualifier. It waits for the first flow in the selected sequence to finish loading the data and then starts extracting the data from the second source qualifier for its loading.

主站蜘蛛池模板: 西昌市| 塔城市| 鹤庆县| 聊城市| 青河县| 那曲县| 随州市| 洪泽县| 安吉县| 余庆县| 昌宁县| 合川市| 新邵县| 峨眉山市| 谢通门县| 彝良县| 辽中县| 车险| 丹寨县| 和林格尔县| 阿拉尔市| 丽江市| 曲水县| 邵阳县| 临桂县| 高清| 潍坊市| 辽宁省| 嵩明县| 页游| 广安市| 张家界市| 三门峡市| 康保县| 华阴市| 清水河县| 夏河县| 吴江市| 紫阳县| 新和县| 西畴县|