The Talend Filters Columns component is useful to filter the source column values and provides the output. If you have N number of columns in the source data, and you want only a few columns, then you can use this Talend Filters Columns filed.
To demonstrate the Talend filter columns field, we are using the customers table available in the SQL Server database.
Talend Filter Columns Example
First, we established a connection to Microsoft SQL Server. Next, we used Talend DBinput to select the customer table within a database.
Drag and drop the Talend filter columns field into the design area. As you can see from the below screenshot, Talend tfiltercolumns maps input columns with output columns. Mapping based on column names.
Please connect the DBInput main row to the Talend filter columns field. As you can see from the below tfiltercolumns image, there is nothing much you can do in the filter columns component tab.
Click on the Edit schema button to check the input and tfiltercolumns output fields, and change as per your requirement.
Here, we removed the Education Column and altered the position of the Hire date.
Next, drag-and-drop the DBOutput field and use the existing connection. As you can see, we are using the Talend_Filter_Column table as the destination. This job will create this table if it doesn’t exist; otherwise, it will drop the existing and creates a new table.
Let us run the Talend tfiltercolumns job.
From the below SQL query, you can see three is no Education column, and the order of the columns has changed as we specified in the Edit schema window.