Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Aggregator transformation
  6. Cleanse transformation
  7. Data Masking transformation
  8. Data Services transformation
  9. Deduplicate transformation
  10. Expression transformation
  11. Filter transformation
  12. Hierarchy Builder transformation
  13. Hierarchy Parser transformation
  14. Hierarchy Processor transformation
  15. Input transformation
  16. Java transformation
  17. Java transformation API reference
  18. Joiner transformation
  19. Labeler transformation
  20. Lookup transformation
  21. Machine Learning transformation
  22. Mapplet transformation
  23. Normalizer transformation
  24. Output transformation
  25. Parse transformation
  26. Python transformation
  27. Rank transformation
  28. Router transformation
  29. Rule Specification transformation
  30. Sequence Generator transformation
  31. Sorter transformation
  32. SQL transformation
  33. Structure Parser transformation
  34. Transaction Control transformation
  35. Union transformation
  36. Velocity transformation
  37. Verifier transformation
  38. Web Services transformation

Transformations

Transformations

Guidelines for overriding the lookup query

Guidelines for overriding the lookup query

Certain rules and guidelines apply when you override a lookup query.
Use the following guidelines:
  • You can override the lookup SQL query for relational lookups.
  • If you override the lookup query, you must also enable lookup caching for the transformation.
  • Enter the entire SELECT statement using the syntax that is required by the database.
  • Enclose all database reserved words in quotes.
  • Include all lookup and return fields in the SELECT statement.
    If you add or subtract fields in the SELECT statement, the
    mapping
    task fails.
  • Use an alias for each column in the query.
    If you do not use column aliases, the mapping task fails with the following error:
    Failed to initialize transformation [<Lookup Transformation Name>]
  • To override the ORDER BY clause, append "
    --
    " at the end of the query.
    The
    mapping
    task generates an ORDER BY clause, even when you enter one in the override. Therefore, you must enter two dashes (
    --
    ) at the end of the query to suppress the generated ORDER BY clause.
  • If the ORDER BY clause contains multiple columns, enter the columns in the same order as the fields in the lookup condition.
  • If the
    mapping
    task uses pushdown optimization, you cannot override the ORDER BY clause or suppress the generated ORDER BY clause with comment notation.
  • If multiple Lookup transformations share a lookup cache, use the same lookup SQL override for each Lookup transformation.
  • When you configure a Lookup transformation that returns all rows, the
    mapping
    task builds the lookup cache with sorted keys. When the transformation retrieves all rows in a lookup, the
    mapping
    task builds the data cache with the keys in sorted order. The
    mapping
    task cannot retrieve all the rows from the cache if the rows are not sorted. If the data is not sorted on the keys, you might get unexpected results.
  • You cannot include parameters in the lookup SQL override.
  • If you configure a lookup SQL override and a lookup source filter in the same transformation, the
    mapping
    task ignores the filter.

0 COMMENTS

We’d like to hear from you!