Define the metadata corresponding to the
LosAngelesandOrangeCounties.txt file in the way described in
Step 6 of Step 1: Job creation, input definition, file reading using the
At Step1 of the wizard, name this metadata entry as LA_Orange_cities.
- Drop the newly created metadata to the top of the design area to create automatically a reading component pointing to this metadata.
Link this component to the tMap component.
- Double-click again on the tMap component to open its interface. Note that the reference input table (row2) corresponding to the LA and Orange county file shows to the left of the window, right under the main input (row1).
Define the join between the main flow and the reference flow.
Drop the City column from your first input table onto the City column of your reference table to establish a join between the two files. A violet link displays, to materialize this join.
- Drop the County column from the right section (row2) onto the Expression field of the County column on the right section (out1).
Click the OK button to validate your changes and
run the new Job.
The following output should display on the console.
The last columns of some of the records are filled with
Orangewhile others are empty. The reason for this is that by default, the tMap implements a left outer join mode. If you want to filter your data to only display lines for which a match is found by the tMap, then open again the tMap, click the tMap settings button and select the Inner Join in the Join Model list on the reference table (row2).