This example illustrates table recoding for a literal value. In this example, the table (prodrecode.csv) recodes the Product Code attribute values from 111222 to 100000, 111333 to 100000, 222123 to 200000, and so on.
The table requires a schema such as a DDX that assigns attribute names to the two columns. Create a schema file that corresponds to the recode table. After creating the recode table and schema, you can specify the Table Recode settings.
Below are the settings for the Product Code attribute:
File Qualifier | TBL1 |
Table File Name | prodrecode.csv |
Table DDL File Name | prodrecode.ddx |
File Delimiter | Comma |
Lookup Table Fields | Original Value |
Lookup Output Fields | Product Code |
Lookup Output Fields Format | Literal |
Recode Table Fields | Recode Value |
Recode Table Fields Format | Literal |
Recoce Output Fields | Product Code |
The settings would look like these in the Table Recode section window:
These settings tell the Transformer to scan the Product Code attribute for Literal, and recode the value according to the recode table (prodcode.csv). After running the Transformer, every Product Code will have the recoded value.