You can create a lookup condition when the Lookup transformation contains generated ports. You can reference a dynamic port or a port selector in a lookup condition. You can also use an expression parameter to parameterize the complete lookup expression.
When the dynamic port contains multiple generated ports, you can define a port selector to filter the generated ports in the lookup condition. The lookup source might change in a dynamic mapping. You can configure a port selector to filter which ports to use for the lookup column. The lookup source port selector must contain the same number of ports as the input columns port selector.
For example, Lookup_PortSelector contains the following ports:
C_CustKey
C_OrderKey
Input_PortSelector contains the following input ports:
CustomerID_IN
OrderID_IN
The following image shows a lookup condition that contains port selectors:
The lookup condition expands to the following expression:
C_CustKey = CustomerID_IN AND C_OrderKey = OrderID_IN
When the lookup condition contains multiple ports, you can configure one operator. For example, you can change the operator to greater than (>). The lookup condition expands to the following expression:
C_CustKey > CustomerID_IN AND C_OrderKey > OrderID_IN
You can create a lookup condition that contains a dynamic port:
Lookup_PortSelector = Dynamic_Input_Port
The dynamic port must contain the same number of ports as the port selector.