When you configure an expression in a dynamic output port, the expression becomes a dynamic expression. A dynamic expression can generate multiple output ports.
You can reference a port selector or a dynamic port in a dynamic expression. When the port selector or dynamic port contains multiple ports, the dynamic expression runs against each port.
When you configure a dynamic expression, the Developer tool does not validate if the generated ports are valid types for the expression. For example, if you reference a port selector that contains decimal type ports in an expression that requires string types, the expression appears as valid at design time.
Example
An Expression transformation has the following generated input ports:
EMPNO Decimal
NAME String
SALARY Decimal
DEPTNO Decimal
The transformation contains a dynamic output port called MyDynamicPort. The output port returns the results of a dynamic expression. The dynamic expression multiplies the value of each port in a port selector by 100. The expression runs one time for each port in the port selector. Each instance can return a different result. The Expression transformation generates a separate output port for each result.
The Decimal_Selector port selector has a selection rule that includes the ports that are of decimal data type:
EMPNO Decimal
SALARY Decimal
DEPTNO Decimal
The following image shows a dynamic expression that references the Decimal_Selector port selector:
Edit the output port settings to change output port names and output port properties. You can also choose the base port.