Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. Aggregator transformation
  7. B2B transformation
  8. Cleanse transformation
  9. Data Masking transformation
  10. Data Services transformation
  11. Deduplicate transformation
  12. Expression transformation
  13. Filter transformation
  14. Hierarchy Builder transformation
  15. Hierarchy Parser transformation
  16. Hierarchy Processor transformation
  17. Input transformation
  18. Java transformation
  19. Java transformation API reference
  20. Joiner transformation
  21. Labeler transformation
  22. Lookup transformation
  23. Machine Learning transformation
  24. Mapplet transformation
  25. Normalizer transformation
  26. Output transformation
  27. Parse transformation
  28. Python transformation
  29. Rank transformation
  30. Router transformation
  31. Rule Specification transformation
  32. Sequence transformation
  33. Sorter transformation
  34. SQL transformation
  35. Structure Parser transformation
  36. Transaction Control transformation
  37. Union transformation
  38. Velocity transformation
  39. Verifier transformation
  40. 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.
  • 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 SQL ELT optimization or is based on a mapping in SQL ELT mode, you can't 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!