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