Enriching data with lookups
So far, we have looked at integration scenarios where we have transformed files from one format to another, but in all cases the data we needed in the output file was contained, in some form, in the input file. However, it is commonplace in real-life scenarios that we need to transform data to the requirements of one system, but the originating system does not actually contain the data we need. It's time to improvise!
In this section, we'll create a job that passes data from one component to another, but on the way, uses a lookup data to replace some data. Imagine that we need to transform some customer data. Our original file is simple, containing the following fields:
Company name
Address
City
State
Zip code
The following is a sample file:
Let's name this file as corporate-addresses.csv
and drop it into your DataIn
folder.
The output file required by the receiving system is exactly the same as this, with one exception. Its state field is only two characters long (as...