The Integration Service finds data in the lookup source with a lookup condition. The lookup condition is similar to the WHERE clause in an SQL query. When you configure a lookup condition in a Lookup transformation, you compare the value of one or more columns in the source data with values in the lookup source or cache.
For example, the source data contains an employee_number. The lookup source table contains employee_ID, first_name, and last_name. You configure the following lookup condition:
employee_ID = employee_number
For each employee_number, the Integration Service returns the employee_ID, last_name, and first_name column from the lookup source.
The Integration Service can return more than one row from the lookup source. You configure the following lookup condition:
employee_ID > employee_number
The Integration Service returns rows for all employee_ID numbers greater than the source employee number.
Use the following guidelines when you enter a condition for a Lookup transformation:
The datatypes for the columns in a lookup condition must match.
You must enter a lookup condition in all Lookup transformations.
Use one input port for each lookup port in the lookup condition. Use the same input port in more than one condition in a transformation.
When you enter multiple conditions, the Integration Service evaluates each condition as an AND, not an OR. The Integration Service returns rows that match all the conditions you configure.
If you include multiple conditions, enter the conditions in the following order to optimize lookup performance:
Less than (<), greater than (>), less than or equal to (<=), greater than or equal to (>=)
The Integration Service matches null values. For example, if an input lookup condition column is NULL, the Integration Service evaluates the NULL equal to a NULL in the lookup.
If you configure a flat file lookup for sorted input, the Integration Service fails the session if the condition columns are not grouped. If the columns are grouped, but not sorted, the Integration Service processes the lookup as if you did not configure sorted input.
The Integration Service processes lookup matches differently depending on whether you configure the transformation for a dynamic cache or an uncached or static cache.