Developer Mapping Guide > Dynamic Mappings > Run-time Links
  

Run-time Links

A run-time link is a link between groups in which the ports might change at run time. The Data Integration Service determines the ports to link at run time based on policies and parameters.
Create a run-time link between groups of the mapping objects if the ports in the upstream transformation can change at run time. If the ports can change at run time, you cannot link the ports when you design the mapping. Create a run-time link that can use a parameter and a link policy to determine which ports to link at run time.
Create a run-time link in the following situations:
You configure the Read transformation to get columns from the data source or to use a source defined by a parameter.
For example, a Read transformation uses a parameter to change the sources or that get metadata changes from the source at run time. The downstream transformations receive data through ports from a generated port that can change between mapping runs. Create and configure a run-time link to the downstream transformations. At run time, the Data Integration Service connects the ports based on the link policy or the parameter values.
You configure the Write transformation to get columns from the data source or the data object or to use a target defined by a parameter.
For example, a Write transformation defines columns based on an associated data object. The Write transformation uses a parameter to change the target or gets metadata changes from the target at run time. create and configure a run-time link to the Write transformation.
Note: Do not create a run-time link to a Write transformation when you define the target columns based on the mapping flow.
At run time, the Data Integration Service connects the ports based on the link policy or the parameter values and passes the data to the downstream port.
Create a run-time link between groups of transformations if the ports in the upstream transformation can change at run time. The Data Integration Service determines which ports to link at run time based on a parameter, link policy, or both that you define. Run-time links appear as thick lines in the mapping editor.
The following image shows a run-time link between an Aggregator transformation and a Write transformation:
The mapping contains an Aggregator transformation and a Write transformation. The Aggregator transformation has a dynamic port and two ports. The Write transformation has eight ports. A think line connects the All Ports groups of the two transformations.

Run-time Link Configuration

Configure run-time link properties to determine which ports to link between mapping objects at run time. You can define a parameter or select link policy or use both to determine which ports to link.
Use the Run-time Linking dialog box or the Run-time Linking tab to configure run-time link properties.
The following image shows the Run-time Linking tab of the Write transformation:
The Run-time Linking tab has Links and Link Properties area. The Links area lists the group ports from which the link originates if the transformation has incoming run-time links. The Link Properties area has options to configure the run-time link properties based on a parameter, link policy, or both.
At run time, the Data Integration Service establishes and resolves links between the ports in the following order:
  1. 1. Links that you manually create in the mapping editor.
  2. 2. Links based on the parameter that you configured for a run-time link.
  3. 3. Links based on the link policy that you configured for a run-time link.
Configure the following properties for run-time links:
Choose the transformations
In the Links area, click the New button and select the transformation from which you want to link the ports at run time in the New Link dialog box. The Links area lists the group ports from which the link originates if the transformation has incoming run-time links.
Configure a parameter
Use a parameter when the port names can change between mapping runs and you know the port name values. Use a parameter of type Input Link Set to connect ports by name values between mapping runs.
For example, you create a parameter named Cust_InputLinkSet of type new Input Link Set and provide the default value as follows: C_Name -> Cust_name. At run time, Data Integration Service creates a link between the ports C_Name and Cust_name. You can change the values of the parameter for the next mapping run as follows: CustFirstName -> Cust_name
Configure the link policy
A link policy links any unlinked ports by name. When you define target columns by mapping flow, the mapping propagates all ports from the source or from upstream objects. Use a run-time linking policy to propagate ports of certain types or with certain names. Select the link policy when the ports have matching names. Use the link policy when you want to automatically link ports that have matching names.
You can configure the link policy to ignore a suffix or a prefix in the port names. For example, if you configure the link policy to ignore the suffix "_OUT", the Data Integration Service links SALARY_OUT to SALARY.
The linking properties appear in the Run-time Linking dialog box or on the Run-time Linking tab in the Properties based on the action you take to link the groups:

Example - Run-time Links

A mapping has a reusable Aggregator transformation that calculates the total salary by department. The Aggregator transformation receives employee data from an Expression transformation that has generated ports.
The Expression transformation might generate the following output ports from a dynamic expression:
Read_EMP Source 1:
EMPNO_OUT
NAME_OUT
SALARY_OUT
DEPTNO_OUT
Read_EMP Source 2:
EMPNUM_OUT
FULLNAME_OUT
SALARY_OUT
DEPT_OUT
The Aggregator transformation instance does not have a dynamic port.
Set the run-time link properties of the Aggregator transformation instance to receive the EMPNO_OUT or EMPNUM_OUT employee number, NAME_OUT or FULLNAME_OUT string, the SALARY number, and the DEPTNO_OUT or DEPT_OUT department number.
The following image shows the links between the Expression transformation and the Aggregator transformation:
The mapping contains a Read, an Expression transformation, and an Aggregator transformation. The Read transformation has four ports. The Expression transformation has a dynamic port and a dynamic output port. The Aggregator transformation has five ports. A think line connects the All Ports groups of the Expression and the Aggregator transformations.