Linking Ports
After you add and configure input, output, transformation, and mapplet objects in a mapping, complete the mapping by linking ports between mapping objects.
The Developer tool creates the connection only when the connection meets link validation and concatenation requirements.
You can leave ports unconnected. The Data Integration Service ignores unconnected ports.
When you link ports between input objects, transformations, mapplets, and output objects, you can create the following types of link:
You can manually link ports or link ports automatically.
One to One Links
Link one port in an input object or transformation to one port in an output object or transformation.
One to Many Links
When you want to use the same data for different purposes, you can link the port providing that data to multiple ports in the mapping.
You can create a one to many link in the following ways:
- •Link one port to multiple transformations or output objects.
- •Link multiple ports in one transformation to multiple transformations or output objects.
For example, you want to use salary information to calculate the average salary in a bank branch through the Aggregator transformation. You can use the same information in an Expression transformation configured to calculate the monthly pay of each employee.
Manually Linking Ports
You can manually link one port or multiple ports.
Drag a port from an input object or transformation to the port of an output object or transformation.
Use the Ctrl or Shift key to select multiple ports to link to another transformation or output object. The Developer tool links the ports, beginning with the top pair. It links all ports that meet the validation requirements.
When you drag a port into an empty port, the Developer tool copies the port and creates a link.
Automatically Linking Ports
When you link ports automatically, you can link by position or by name.
When you link ports automatically by name, you can specify a prefix or suffix by which to link the ports. Use prefixes or suffixes to indicate where ports occur in a mapping.
Linking Ports by Name
When you link ports by name, the Developer tool adds links between input and output ports that have the same name. Link by name when you use the same port names across transformations.
You can link ports based on prefixes and suffixes that you define. Use prefixes or suffixes to indicate where ports occur in a mapping. Link by name and prefix or suffix when you use prefixes or suffixes in port names to distinguish where they occur in the mapping or mapplet.
Linking by name is not case sensitive.
1. Click Mapping > Auto Link.
The Auto Link dialog box appears.
2. Select an object in the From window to link from.
3. Select an object in the To window to link to.
4. Select Name.
5. Optionally, click Show Advanced to link ports based on prefixes or suffixes.
6. Click OK.
Linking Ports by Position
When you link by position, the Developer tool links each output port to the corresponding input port. For example, the first output port is linked to the first input port, the second output port to the second input port. Link by position when you create transformations with related ports in the same order.
1. Click Mapping > Auto Link.
The Auto Link dialog box appears.
2. Select an object in the From window to link from.
3. Select an object in the To window to link to.
4. Select Position and click OK.
The Developer tool links each output port to the corresponding input port. For example, the first output port is linked to the first input port, the second output port to the second input port.
Rules and Guidelines for Linking Ports
Certain rules and guidelines apply when you link ports.
Consider the following rules and guidelines when you connect mapping objects:
- •If the Developer tool detects an error when you try to link ports between two mapping objects, it displays a symbol indicating that you cannot link the ports.
- •Follow the logic of data flow in the mapping. You can link the following types of port:
- - The receiving port must be an input or input/output port.
- - The originating port must be an output or input/output port.
- - You cannot link input ports to input ports or output ports to output ports.
- •You must link at least one port of an input group to an upstream transformation.
- •You must link at least one port of an output group to a downstream transformation.
- •You can link ports from one active transformation or one output group of an active transformation to an input group of another transformation.
- •You cannot connect an active transformation and a passive transformation to the same downstream transformation or transformation input group.
- •You cannot connect more than one active transformation to the same downstream transformation or transformation input group.
- •You can connect any number of passive transformations to the same downstream transformation, transformation input group, or target.
- •You can link ports from two output groups in the same transformation to one Joiner transformation configured for sorted data if the data from both output groups is sorted.
- •You can only link ports with compatible datatypes. The Developer tool verifies that it can map between the two datatypes before linking them. The Data Integration Service cannot transform data between ports with incompatible datatypes.
- •The Developer tool marks some mappings as not valid if the mapping violates data flow validation.