Transformations > Lookup Transformation > Lookup Query Overrides
  

Lookup Query Overrides

The Mapping Configuration task queries the lookup based on the fields and properties you configure in the Lookup transformation. The Mapping Configuration task runs a default lookup query when the first row enters the Lookup transformation. If you use a lookup against a relational table, you can override the lookup query. You can use the override to change the ORDER BY clause, add a WHERE clause, or transform the lookup data before it is cached.
If you configure a SQL override and a filter on the lookup query, the Mapping Configuration task ignores the filter.
You can override the default lookup query by using an alias. For example, if you use the following query, the task fails as an "invalid Lookup SQL override":
SELECT IDH_LAST_MODIFICATION_DATE_CFROM VW_ID_HISTORY_Max_Last_Modification_Date WHERE IDH_COUNTRY_CODE_C='GB'
Instead, you can use this query, which includes an alias:
SELECT IDH_LAST_MODIFICATION_DATE_C as IDH_LAST_MODIFICATION_DATEC FROM VW_ID_HISTORY_Max_Last_Modification_Date WHERE IDH_COUNTRY_CODE _C='GB'