Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

SQL Override for Uncached Lookup

SQL Override for Uncached Lookup

You can define a SQL override for uncached lookups. The Integration Service does not build a cache from the override statement for an uncached lookup. You can use SQL functions in the override SELECT statement. You can override all of the SQL query including the WHERE and ORDER BY clause.
When you generate the default SELECT statement, the Designer generates a SELECT statement that includes the lookup and output ports and the WHERE clause based on the lookup condition. If the Lookup transformation is an unconnected lookup, the SELECT statement includes the lookup ports and the return port. The Integration Service does not generate the WHERE clause from the condition that you configure in the Condition tab of the Lookup transformation.
Each column in the SELECT query uses an alias to define the output column. Do not change this syntax in the SQL statement, or the query fails. To reference input ports in the WHERE clause, configure parameter binding. The following example includes a WHERE statement that references the Name port:
SELECT EMPLOYEE.NAME as NAME, max(EMPLOYEE.ID) as ID from EMPLOYEE WHERE EMPLOYEE.NAME=?NAME1?
The SQL Editor for uncached lookup displays the input ports and the lookup ports on the Ports tab.
If you add a function to the SQL statement, the return datatype must match the datatype of the ALIAS column. For example, the datatype of ID matches the return type of the MAX function:
SELECT EMPLOYEE.NAME as NAME, MAX(EMPLOYEE.ID) as ID FROM EMPLOYEE
You cannot use subqueries in the SQL override for uncached lookups.

0 COMMENTS

We’d like to hear from you!