In order to have a more specific idea of the data contained in
your dataset or in order to perform functions on a certain subset of data, you can
create a filter on your data.
This example uses a dataset with typical customer information, such as their names, age,
email or city they live in. You are going to create some filters to only display the
male customers from New York, by using the search field, as well as the Add
filter button.
Procedure
-
In the Add a filter field on the top left of the grid,
start typing the value you want for your filter, new york
in this example. Talend Data Preparation suggests columns containing this value.
The suggestions are based on the data that is contained in the sample.
-
Select new york in City to only display the entries
corresponding to this location.
You can see in the Filter bar that the filter has been correctly applied with
the contains
operator.
Filter badges can be edited to search for any value.
The Add a filter field is convenient to quickly search
for a value across the whole sample, but you can also be more accurate and
manually select which column, operator, and keyword to use. You will now
apply another filter, to isolate the male customers, among the ones already
filtered, this time with the Add filter button.
-
Click the Add filter
button to start creating a new badge.
-
From the list of columns, select gender.
-
Select Equal to as operator.
-
Enter M as keyword, and click
Apply to add this filter to the previous one.
The grid now only displays the data corresponding to those two filters
-
In the functions panel, click a function to execute it on the data you
filtered, Keep these Filtered Rows for example.
-
In the filter bar, click the cross in each individual filter or click the
garbage bin icon to clear the filters and display the whole dataset again.
Results
You have filtered your data to isolate a specific customer group and you can start
applying function and work on this sample only.
You can apply filters manually, or use the charts panel to create even more complex
filters.