Transformations > Lookup transformation > Lookup source filter

Lookup source filter

You can configure a lookup source filter for a relational Lookup transformation that has caching enabled. Add the lookup source filter to limit the number of lookups that the mapping task performs on a lookup source table. When you configure a lookup source filter, the mapping task performs lookups based on the results of the filter statement.
To configure a lookup source filter, open the Advanced tab of the Lookup transformation, and enter the filter in the Lookup Source Filter field. Do not include the WHERE keyword in the filter condition.
For example, you might need to retrieve the last name of every employee whose ID is greater than 510.
You configure the following lookup source filter on the EmployeeID field in the Lookup transformation:
EmployeeID >= 510
When the mapping task reads the source row, it performs a lookup on the cache when the value of EmployeeID is greater than 510. When EmployeeID is less than or equal to 510, the Lookup transformation does not retrieve the last name.
When you add a lookup source filter to the Lookup query for a mapping task that uses pushdown optimization, the mapping task creates a view to represent the SQL override. The mapping task runs an SQL query against this view to push the transformation logic to the database.
Note: If you configure a lookup source filter and a lookup SQL override in the same transformation, the mapping task ignores the filter.