Goal
Value Mapper is a type of transform that maps string values of a field in the input record to another value. Mappings are usually stored in another dataset. This provides you a simple alternative for mapping data in the record.
Checklist
- User stories documented
- User stories reviewed
- Design documented
- Design reviewed
- Feature merged
- Examples and guides
- Integration tests
- Documentation for feature
- Short video demonstrating the feature
Use-case for Value Mapper Plugin
If you want to replace language codes in the input record field to language description.
- Source Field name : language_code
- Target field name : language_desc
- Mappings, Source / Target : DE/German, ES/Spanish, EN/English, etc.
Conditions
If source field to be mapped is null, then target field will be null
If source field to be mapped is empty, then target field will be empty
If source field cannot be mapped, then a default could be assigned and that’s populated in the target field
More than one field can be mapped using this transform
Source field type can be of only string type
Output field type can be of only string type
Options
Following are the options that should be provided for user to configure
Configuring the value mapper fields
Mapping
Source Field Name
Dataset
Target Field Name
Can support one or more such mappings
How the source field should be handled
If NULL, then user can provide a default value or NULL
If EMPTY, then user can provide a default value or EMPTY
Output Schema should allow
Remove Source Field
Include Target Field
Design