In this five-component Job, we will sort entries on an input name list, find out duplicated names, and display the unique names and the duplicated names on the Run console.
Drop a tFileInputDelimited, a tSortRow, a tUniqRow, and two tLogRow components from the Palette to the design workspace, and name the components as shown above.
Connect the tFileInputDelimited component, the tSortRow component, and the tUniqRow component using Row > Main connections.
Connect the tUniqRow component and the first tLogRow component using a Main > Uniques connection.
Connect the tUniqRow component and the second tLogRow component using a Main > Duplicates connection.
Double-click the tFileInputDelimited component to display its Basic settings view.
Click the [...] button next to the File Name field to browse to your input file.
Define the header and footer rows. In this use case, the first row of the input file is the header row.
Click Edit schema to define the schema for this component. In this use case, the input file has five columns: Id, FirstName, LastName, Age, and City. Then click OK to propagate the schema and close the schema editor.
Double-click the tSortRow component to display its Basic settings view.
To rearrange the entries in the alphabetic order of the names, add two rows in the Criteria table by clicking the plus button, select the FirstName and LastName columns under Schema column, select alpha as the sorting type, and select the sorting order.
Double-click the tUniqRow component to display its Basic settings view.
In the Unique key area, select the columns on which you want deduplication to be carried out. In this use case, you will sort out duplicated names.
In the Basic settings view of each of the tLogRow components, select the Table option to view the Job execution result in table mode.