Developer Mapping Guide > Dynamic Mappings > Dynamic Ports and Generated Ports
  

Dynamic Ports and Generated Ports

You can create dynamic ports in a transformation to receive new or changed columns from an upstream transformation. A dynamic port receives one or more columns and generates ports based on input rules. The input rules determine the columns that a dynamic port receives and generates.
Use dynamic ports to perform the following tasks:
Receive new and changed columns.
To get data from a dynamic source or a parameterized source, create a dynamic port in the downstream transformations to receive new and changed columns. If a mapping contains from a dynamic source, the dynamic ports in the downstream transformations automatically get any new or changed columns. For example, if a new column "title" is added to the dynamic source, the Read transformation passes the new column to the dynamic port and the dynamic port creates a generated port for the "title" column.
Filter columns based on input rules.
To process only a certain type of column in a transformation, create a dynamic port and define input rules to filter columns. For example, a mapping source has columns with decimal, string, and date/time data types. You need to process data only for columns of decimal data type. Create a dynamic port and define input rules to include only decimal columns.
Repeat a calculation for more than one port in an Expression transformation
To perform the same calculation on more than one port, use dynamic ports in dynamic expressions. A dynamic expression runs one time for each port in the dynamic port and returns the result to a dynamic output port.
The following image shows a dynamic port named From_Read_Employee and the generated ports:
A mapping contains a Read transformation and a Sorter transformation. The dynamic port From_Read_Employee in the Sorter transformation contains all the ports from the Read transformation as generated ports.

Dynamic and Generated Port Configuration

You can create a dynamic port from the All Ports group of a Read transformation, a group of an upstream transformation, or a dynamic port in an upstream transformation. The Developer tool creates dynamic ports with the data type value as dynamic. You can create more than one dynamic port in a transformation.
When you use the New button to create a port, the Developer tool assigns a default name. Rename the dynamic ports to ensure that the port names within each transformation are unique. When you add ports of the same name to a transformation, the Developer tool appends a number to the dynamic port or the generated port to resolve port naming conflicts.
You can create dynamic ports in the following transformations:
If the mapping contains transformations that cannot include dynamic ports, you might need to manually update the mapping when the source metadata changes.
Note: Any change to the port attributes propagates to the generated ports in the pipeline. You do not need to manually propagate the changed port attributes.

Rules and Guidelines for Dynamic and Generated Ports

Consider the following rules and guidelines when you work with dynamic and generated ports: