Thursday, November 26, 2015

What the difference between tMap Catch Lookup Inner Join Reject and Catch Output Reject

In tMap there are two type reject links options available.
  1. Catch Lookup Inner Join Reject: This option, once activated, allows you to catch the records rejected by the inner join operation performed on the input flows.
  2. Catch Output Reject: This option, once activated, allows you to catch the records rejected by a filter you have defined in the appropriate area.
The following example will make you more clearly about the differences. Create a job with main and lookup flow as shown below.
In the tMap editor:
Click the white arrow on each table to display the filter fields.
In the customer table, type !, press Ctrl+Space, click row1.CustomerAddress in the autocompletion list and type the Java syntax.equals("unknown").
In the state table, type state.LabelState !=null && !state.LabelState.isEmpty() to avoid null and empty fields.
In the out1 table, type the Java syntax"Ohio".equals() and press Ctrl+Space and, between the brackets, click state.LabelState in the autocompletion list.
Click OK

Run the job, you will see the output as shown below, only “Ohio” State data only will be flow over out1.
Now let see how to catch the rejected records by the filter.
In the tMap editor:
Click (+) on the toolbar above the out1 table, to add a new output table. In the Add a new output table wizard, type the name you want to give to the table (rejectFilterOut1). Click OK.

In the rejectFilterOut1, click the wrench button and change the Catch output reject option to true to collect all the data rejected by the out1 output filter.
Run the job, you will see all the records which are rejected by filter flow through rejectFilterOut1.
You can see that the Job is working, but still few more records are missing. These were rejected by Inner Join not the output filter. We want to put them in a different output.
Create new output and For the Catch lookup inner join reject property, select the true value.
If you run the job, you will see all the records are passing.
Cheers!
Uma

3 comments: