Talend Filter Columns

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 1

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.

Talend Filter Columns 2

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.

Talend Filter Columns 3

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.

Talend Filter Columns 4

Click on the Edit schema button to check the input and tfiltercolumns output fields, and change as per your requirement.

Talend Filter Columns 5

Here, we removed the Education Column and altered the position of the Hire date.

Talend Filter Columns 6

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.

Talend Filter Columns 7

Let us run the Talend tfiltercolumns job.

Talend Filter Columns 8

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.

Talend Filter Columns 9