Create an unconnected Lookup transformation when you want to perform a lookup from an expression. You can create a reusable or a non-reusable unconnected Lookup transformation on a flat file, reference table, or relational data object.
Select a project or folder in the
Object Explorer
view.
Click
File
New
Transformation
.
Browse to the Lookup wizard.
Select
Flat File Data Object Lookup
,
Reference Table Lookup
, or
Relational Data Object Lookup
.
Click
Next
.
The
New Lookup
dialog box appears.
Select a physical data object or reference table in the Developer tool.
Enter a name for the transformation.
In the
On multiple matches
dropdown, choose the strategy to use when the Lookup transformation finds multiple rows that match the lookup condition.
Do not choose
Return All
for an unconnected lookup.
Click
Finish
.
The Lookup transformation appears in the editor.
In the
Ports
section in the
Overview
view, add ports to the transformation.
Create an input port for each argument in the :LKP expression. Create an input port for each lookup condition that you create. You can use an input port in multiple conditions.
In the
Ports
section in the
Overview
view, configure one port as the return port.
In the
Lookup
view, add one or more lookup conditions to compare the transformation input values with values in the lookup source or cache.
When the condition is true, the lookup returns a value in the return port. If the lookup condition is false, the lookup returns NULL.
Create a :LKP expression for a port in a transformation that allows expressions, such as an Aggregator transformation, Expression transformation, or Update Strategy transformation.
When you create a mapping, add the unconnected Lookup transformation to the mapping in the editor, but do not connect the ports to the other transformations in the mapping.