In tMap there are two type reject links options available.
- 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.
- Catch Output Reject: This option, once activated, allows you to catch the records rejected by a filter you have defined in the appropriate area.
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.
Uma
Nice Example
ReplyDeleteĐơn Vị Ship Cấp Tốc Hàng Hóa Từ Việt Nam Sang Thái Lan Giá Thấp
ReplyDeleteDịch vụ ship nhanh hàng hóa từ việt nam
Công ty giúp order hàng từ trên Taobao
Thank you so much!
ReplyDelete