When you create an entity-based or file-based recode table, you can match up to five (5) attributes against the original value for the recode to take place. This creates an AND condition for the recode operation. The Transformer combines the multiple attributes in the recode table into a string, and then tries to find that string in the combined attributes in the output. You can then recode up to five attributes in the output.
The number of attributes that you look up does not have to be the same as the number of attributes that you recode. For example, you could look up three attributes and recode two attributes.
Recode Table
Brand |
Make | Model | Code | Discount |
---|---|---|---|---|
X | A | 1 | AB9 | 10 |
Y | B | 2 | CD8 | 20 |
Z | C | 3 | EF7 | 30 |
Before Recode
Row # |
Brand |
Make | Model | Code | Discount |
---|---|---|---|---|---|
1 | X | A | 1 | ZZ1 | 5 |
2 | Y | C | 2 | YY2 | 10 |
3 | Z | C | 3 | XX3 | 15 |
Configure a Table Recode where the look-up attributes are Brand, Make and Model and the recode attributes are Code and Discount. The Transformer combines the Brand, Make, and Model attributes into a string (for example, 'X' + 'A' + '1' = "XA1") and looks for that string in the combined attributes in the output. In this example, Row # 1 (XA1) and #3 (ZC3) are matches and they receive the recode values in the Code and Discount attributes.
After Recode
Row # |
Brand |
Make | Model | Code | Discount | |
---|---|---|---|---|---|---|
1 | X | A | 1 | AB9 | 10 | < match found so Code and Discount change |
2 | Y | C | 2 | YY2 | 10 | < no match found so no change |
3 | Z | C | 3 | EF7 | 30 | < match found so Code and Discount change |