Sunteți pe pagina 1din 8

Multiple Targets & Target Load Plans

Informatica can be used to load multiple targets from a single source. The source can be a relational
database or a flat file or any other type and it can be used to load data into multiple heterogeneous
targets at the same time.
The example that well be taking a look at involves loading data from a relational table to another
relational table as well as a flat file.

Loading Source data to multiple target - File and Relational


Step 1:
Create a mapping named m_Departments_ff_table. The name suggests that we will be loading the
Departments table in the Target database and a flat file as well named Departments_target.txt using a
source Departments from the database HR.

Step 2:

Create a workflow named wf_departments_ff_table

Now create a session named s_departments_ff_table using the mapping


m_Departments_ff_table

Edit the session properties as follows:

In the Mapping tab, select the source and set its connection to HR

Select the Departmens relational table target and set its connection as TARGET.

Select the Department_Target flat file target and input the target file directory and name in the
options:

Click ok, save your work and execute the workflow.

Target Load Plan


Informatica allows you to load multiple targets using more than one pipeline in a single mapping. For
example we need to load the employees table and the departments table sequentially. And they have to
be loaded together every time. So instead of creating two separate mapping well create a single
mapping with two separate sources and two separate targets. They wont be linked to each other; the
two flows will be mutually exclusive. Due to this well have the option to run whichever flow we want
first. This functionality is achieved by the Target Load Order or Target Load Plan option.
Target Load Plan
Target load order (or) Target load plan is used to specify the order in which the integration service loads
the targets. You can specify a target load order based on the source qualifier transformations in a
mapping. If you have multiple source qualifier transformations connected to multiple targets, you can
specify the order in which the integration service loads the data into the targets.
Target Load Order Group
A target load order group is the collection of source qualifiers, transformations and targets linked in a
mapping. The integration service reads the target load order group concurrently and it processes the
target load order group sequentially. The following figure shows the two target load order groups in a
single mapping:

Use of Target Load Order:


Target load order will be useful when the data of one target depends on the data of another target. For
example, the employees table data depends on the departments data because of the primary-key and
foreign-key relationship. So, the departments table should be loaded first and then the employees table.
Target load order is useful when you want to maintain referential integrity when inserting, deleting or
updating tables that have the primary key and foreign key constraints.

Target Load Order Setting:


You can set the target load order or plan in the mapping designer. Follow the below steps to configure
the target load order:
1. Login to the PowerCenter designer and create a mapping that contains multiple target load order
groups.

2. Click on the Mappings in the toolbar and then on Target Load Plan. The following dialog box will pop
up listing all the source qualifier transformations in the mapping and the targets that receive data from
each source qualifier.

3. Select a source qualifier from the list.


4. Click the Up and Down buttons to move the source qualifier within the load order.
5. Repeat steps 3 and 4 for other source qualifiers you want to reorder.
6. Click OK.
Disadvantages
1. All the streams or pipelines that youve created in the mapping will run together.
2. You wont have the option to run them separately.
3. If one of the streams succeeds and the other fails, youll have to restart the complete job. Partial
job runs are not possible.
4. Therefore put only those streams in a single mapping which are closely related and have to be
executed together always.

S-ar putea să vă placă și