This step transforms the data from the input file using a
tMap component.
The tMap component can handle:
- multiple inputs and outputs
- search for reference (simple, cartesian product, first, last
match...)
- join (inner, outer)
- transformations
- rejections
- and more...
Procedure
-
Remove the link between the two components by right-clicking the link and selecting
Delete option. Then place the
tMap of the Processing
component group in between before linking the input component to the
tMap.
-
Connect the tFileInputDelimited component to the
tMap component using a Row >
Main link.
-
Right-click the tMap component, select and click the tLogRow component. Type in
out1 in the dialog box to implement the link. Logically, a
message box shows up (for the back-propagation of schemas), ignore it by clicking
No.
-
Double-click the tMap to access its interface.
The left part displays the schema (description) of the input file
(row1). The right part displays the output schema
(out1).
-
Drop the Firstname and Lastname
columns to the right, onto the Name column as shown on
the screen below. Then drop the other columns Address and
City to their respective line.
-
Carry out the following transformations on each column:
-
Remove the Lastname column from the out1 table and
increase the length of the remaining columns. To do so, go to the
Schema Editor located at the bottom of the Map editor and
proceed as follows:
-
Select the column to be removed from the schema and click the
cross icon.
-
Select the column of which you need increase the length
size.
-
Type in the length size you intend in the length column.
In this example, change the length of every remaining column to
40.
Note: As the first name and the last name of a client are concatenated,
it is necessary to increase the length of the name columns in order to match the
full name size. No transformation is made to the City
column.
-
Click OK to validate the changes and close
the Map editor interface.
-
Run your Job.
Results
The addresses are displayed in upper case and the first names and last names are
gathered in the same column.