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

Dynamic Lookup example

Dynamic Lookup example

To configure a Lookup transformation to be dynamic, use a dynamic lookup cache.
A dynamic cache is helpful when the source table contains a large amount of data or it contains duplicate primary keys.
The following example illustrates the advantage of using a dynamic cache rather than a static cache when the source table includes duplicate primary keys.
You want to update your payroll table with data from your Human Resources department. The payroll table includes the following data, where ID is the primary key:
ID
Name
Location
1
Abhi
USA
2
Alice
UK
You create a mapping with a Lookup transformation and use the payroll table for the target and the lookup cache. You configure the cache to be dynamic because you expect the Human Resources department's table to contain duplicate keys.
In the mapping, you specify the Human Resources department's table to be the source. The source table includes the following data:
ID
Name
Location
1
Abhi
India
2
Alice
UK
3
James
Japan
3
James
USA
You create a
mapping
task to update the payroll table. When the
mapping
task begins, it creates the cache file that contains the rows in the target table. As the task processes the rows, it flags the first row as an update and it updates the cache. It flags the third row as an insert and inserts the row in the cache. It flags the fourth row as an update because the row exists in the cache.
If you follow the same scenario using a static cache, the task flags the fourth row as an insert. The cache does not contain the row for James because it does not update as the task processes the rows. The target database produces an error because it cannot handle two rows with the same primary key.