Setting expressions for multiple output columns simultaneously
About this task
tMap allows you to define the transformation behavior for multiple output columns at the same time.
Using a simple transformation Job, the following example shows how to define expressions on multiple columns in a batch manner in tMap.
Here is the content of the input CSV file used in this example:
id;firstname;lastname;city;state
1; Andrew;Adams;Madison; Rhode Island
2;Andrew; Garfield; Saint Paul;Colorado
3; Woodrow; Eisenhower ; Juneau; New Hampshire
4;Woodrow; Jackson;Denver;Maine
5; Lyndon;Buchanan; Pierre; Kentucky
6; Bill;Tyler; Helena; New York
7;George;Adams;Oklahoma City ;Alaska
8;Ulysses; Garfield;Santa Fe;Massachusetts
9; Thomas;Coolidge ;Charleston; Mississippi
10;John;Polk; Carson City; Louisiana
In this example, all the output columns of type String will be trimmed to remove preceding and training whitespace and the last names and state names will be transformed to upper case.
Procedure
Results
Now the expressions on those output columns look like below:
The functions will be carried out along the flow processing. The output of
this example is as shown below.