Working with Targets in a Mapping - Informatica

When you create a mapping, you must add one or more target definitions to it. When you drag a target definition into the Mapping Designer workspace, you add an instance of the target definition.

When you add targets to a mapping, you can include different types of targets. You can include targets of the same database type, but different database connections. You can also include both relational and flat file targets in the same mapping.

When you edit the target in the Target Designer, all instances of the target in mappings inherit the changes. Some changes might invalidate the mappings using the target.

Note:When you add a target definition with some special characters in the table name to a mapping, the Designer replaces the character with an underscore in the target instance name for the mapping.

You can configure properties for relational, file, and XML targets in a mapping.

Configuring Relational Targets in a Mapping

For relational targets, you can configure the following properties within a mapping:

  • Reject truncated and overflow data. Select this option in the target instance Properties tab when you want the Integration Service to write truncated data to the reject file.
  • Update override. Override the default UPDATE statement using the SQL Editor in the target instance Properties tab.
  • Table name prefix. Specify the owner of the target tables in the target instance Properties tab.
  • Pre- and post-session SQL. Enter pre-session SQL commands for a target instance in a mapping to execute commands against the target database before the Integration Service reads the source. Enter post-session SQL commands to execute commands against the target database after the Integration Service writes to the target.
  • Target table name. You can override the default target table name.

Configuring Flat File Targets in a Mapping

For flat file targets, you can configure the following properties within a mapping:

  • Datetime format. Define the default datetime format to use for datetime values.
  • Thousands separator. Define the default thousands separator to use for numeric values.
  • Decimal separator. Define the default decimal separator to use for numeric values.

Configuring XML Targets in a Mapping

For XML targets, you can change the root element. However, if you change the root, you affect the target XML structure and you can invalidate the mapping.

Setting the Target Load Order

You can configure the target load order for a mapping containing any type of target definition. In the Designer, you can set the order in which the Integration Service sends rows to targets in different target load order groups in a mapping. A target load order group is the collection of source qualifiers, transformations, and targets linked together in a mapping. You can set the target load order if you want to maintain referential integrity when inserting, deleting, or updating tables that have the primary key and foreign key constraints.

The Integration Service reads sources in a target load order group concurrently, and it processes target load order groups sequentially.

To specify the order in which the Integration Service sends data to targets, create one source qualifier for each target within a mapping. To set the target load order, you then determine in which order the Integration Service reads each source in the mapping.

The following figure shows two target load order groups in one mapping:

Setting the Target Load Order

In this mapping, the first target load order group includes ITEMS, SQ_ITEMS, and T_ITEMS. The second target load order group includes all other objects in the mapping, including the TOTAL_ORDERS target. The Integration Service processes the first target load order group, and then the second target load order group.

When it processes the second target load order group, it reads data from both sources at the same time.

To set the target load order:

  1. Create a mapping that contains multiple target load order groups.
  2. Click Mappings > Target Load Plan.
  3. The Target Load Plan dialog box lists all Source Qualifier transformations in the mapping and the targets that receive data from each source qualifier.

  4. Select a source qualifier from the list.
  5. Click the Up and Down buttons to move the source qualifier within the load order.
  6. Repeat steps 3 to 4 for other source qualifiers you want to reorder.
  7. Click OK.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Informatica Topics