Processing data is one of the key capabilities of any Extract, Transform, and Load (ETL) tool and Kettle is no different. Sometimes though, data must be processed differently (usually due to data quality issues or business rules). If this logic is needed in multiple places, it makes sense to break that code out into its own transformation using a Mapping (sub-transformation).
This recipe will be creating a simple usage of the Mapping (sub-transformation) step.
For this recipe, we will be building off of the Splitting a stream in two or more streams based on a condition recipe, presented earlier in this chapter. It is recommended to follow this recipe and understand how the Switch/Case step works before continuing. Alternatively, the code for this recipe is available on the book's website.