Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

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

Rank transformation example

Rank transformation example

You store customer data in a relational database table. You want send a promotion to the top three customers in each tier. Use a Rank transformation to rank the customers in each tier by order amount.
The source, mapping, and target are configured as follows:

Source Data

The following table shows the source data:
CUST_ID
CUST_TIER
CUST_NAME
ORDER_AMT
10110102
Gold
Brosseau, Derrick
63508.12
10110109
Platinum
Acheson, Jeff
139824.15
10110143
Silver
Cudell, Bob
49614.00
10110211
Silver
Amico, Paul
47677.30
10110215
Platinum
Bergeron, Kim
148871.25
10110224
Silver
Madison, Shelley
40497.10
10110235
Gold
Anderson, Rick
50429.27
10110236
Silver
Tucker, Paul
42585.00
10110237
Silver
Smith, Robert
38563.98
10110393
Gold
Washington, Rochelle
73767.96
10110425
Gold
Nguyen, Trang
65522.25
10110434
Silver
Keane, Thomas
38055.40
10110436
Platinum
Catherwood, Jennifer
117107.44
10110442
Platinum
Charest, Walter
126618.60
10110458
Gold
Coutts, Sylvain
70646.32
10110497
Platinum
Zheng, Wei
191422.00
10110506
Gold
Gonzales, Roberto
79342.90
10110526
Gold
Vanelo, Susan
81978.06
10110528
Platinum
Abedini, John
136506.32
10110530
Silver
Sousa, Maria
10155.42

Mapping Configuration

Configure the mapping as shown in the following image:
The mapping shows Source transformation "src_Customers" connected to Rank transformation "rnk_CustByOrderAmt." The Rank transformation is connected to target "tgt_Top5CustPerTier."
Configure the Rank transformation as follows:
Rank tab
Configure the following properties:
Field
Value
Rank By
ORDER_AMT
Rank Order
Top
Parameterize Number of Rows
Not Parameterized
Number of Rows
3
Group By tab
Select CUST_TIER as the group by field.

Target Data

The following table shows the data that is written to the target when you run the mapping:
RANKINDEX
CUST_ID
CUST_TIER
CUST_NAME
ORDER_AMT
1
10110526
Gold
Vanelo, Susan
81978.06
2
10110506
Gold
Gonzales, Roberto
79342.90
3
10110393
Gold
Washington, Rochelle
73767.96
1
10110497
Platinum
Zheng, Wei
191422.00
2
10110215
Platinum
Bergeron, Kim
148871.25
3
10110109
Platinum
Acheson, Jeff
139824.15
1
10110143
Silver
Cudell, Bob
49614.00
2
10110211
Silver
Amico, Paul
47677.30
3
10110236
Silver
Tucker, Paul
42585.00

0 COMMENTS

We’d like to hear from you!