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. Deduplicate transformation
  9. Expression transformation
  10. Filter transformation
  11. Hierarchy Builder transformation
  12. Hierarchy Parser transformation
  13. Hierarchy Processor transformation
  14. Input transformation
  15. Java transformation
  16. Java transformation API reference
  17. Joiner transformation
  18. Labeler transformation
  19. Lookup transformation
  20. Mapplet transformation
  21. Normalizer transformation
  22. Output transformation
  23. Parse transformation
  24. Python transformation
  25. Rank transformation
  26. Router transformation
  27. Rule Specification transformation
  28. Sequence Generator transformation
  29. Sorter transformation
  30. SQL transformation
  31. Structure Parser transformation
  32. Transaction Control transformation
  33. Union transformation
  34. Velocity transformation
  35. Verifier transformation
  36. 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.