The data rejected by the lookup and filter conditions set in tXMLMap can be caught and outputted by this component itself.
Based on Scenario 3: Mapping data using a filter, this scenario presents how to catch the data rejected by the lookup and the filter set up in the previous scenarios. Another tLogRow component is added to the Job used in the previous scenario to display the rejected data.
In your Studio, open the Job used in the previous scenario to display it in the design workspace.
Add another tLogRow component to the Job by typing its name in the design workspace or dropping it from the Palette.
Link the tXMLMap component to the second tLogRow using a Row > *New Output* (Main) connection. In the pop-up dialog box, enter the name of the output connection, Reject in this example.
Double-click the tXMLMap component to open its Map Editor. An empty Reject output table that carries the rejected data has been added to the output side to represent the output data flow carrying the rejected data.
In the row1 main input table, click the id node and drop it on the Reject output table. A column id is added to the Reject schema table in the Schema editor on the lower part of the map editor.
Do the same to drop CustomerName, CustomerAddress, and idState in the row1 main input table and LabelState in the row2 lookup input table on the Reject output table. Another four columns CustomerName, CustomerAddress, idState, and LabelState are added to the Reject schema table in the Schema editor.
In this scenario, the Reject output flow uses the flat data type. However, you can create an XML tree view for this flow similar to the Customer output flow using the Document data type. For further information about how to use the Document type, see Scenario 1: Mapping and transforming XML data.
On the top of the Reject output table, click the button to open the property setting area.
Set the value of the Catch Output Reject property to true to catch the data rejected by the filter set up in the previous scenario for the Customer output flow.
Set the value of the Catch Lookup Inner Join Reject property to true to catch the data rejected by the inner join operation.
Click OK to validate the changes and close the map editor.
Double-click the second tLogRow component to open its Basic settings view.
Click the Sync columns button to retrieve the schema from its preceding component.
In the Mode area, select Table (print values in cells of a table) for better readability of the result.
Press Ctrl+S to save the Job.
Press F6 to run the Job.
The captured data rejected by the filter and the lookup reads as follows in the Run view:
As shown above, the data whose idState value is 2 is selected by the filter set up in the previous scenario and displayed in the upper part, and the data whose idState value is not 2 is rejected and displayed in the lower part.