xflow Help

Fiter Data

The Filter node allows users to selectively extract or exclude data from a dataset based on specific criteria. It refines datasets by applying conditions like equality, comparison, range, or null checks to columns or fields, focusing on relevant data subsets. This functionality facilitates efficient analysis, reporting, and data manipulation tasks.

Configuration

Upon clicking the Filter node, users are presented with the following fields in the configuration section:

  • Add Rule: Define individual conditions to define segmentation criteria.

  • Add Group: Combine conditions together using logical operators like AND, OR, or NOT to create more complex segmentation rules.

Creating Conditions:

  • Field Selection: Select the column from dropdown within the dataset on which the condition will be applied.

  • Logic Condition: Choose from a range of logical operators such as

    1. Equal to (==)

    2. Not equal to (!=)

    3. Greater than (>)

    4. Greater than or equal to (>=)

    5. Less than (<)

    6. Less than or equal to (<=)

    7. Between

    8. Not between

    9. Is null

  • Input Value: Specify the value against which the selected column will be evaluated.

Logic Representation

The SQL Query Display section provides users with a view of the SQL query generated based on the conditions they have created. This allows users to understand the underlying SQL logic behind their segmentation rules.

Example Usage

Problem Statement: Let's consider a scenario to pinpoint employees who fit particular age and salary ranges for performance assessment. Additionally, we aim to remove employees associated with the Finance department from consideration.

Dataset

Employee ID

Name

Age

Department

Salary

101

Alice

30

HR

60000

102

Bob

28

IT

55000

103

Charlie

35

Marketing

70000

104

David

32

Finance

62000

105

Emily

27

Operations

58000

106

Frank

31

HR

62000

107

Grace

29

Finance

54000

108

Henry

33

IT

64000

109

Irene

26

Marketing

56000

110

Jack

34

Operations

61000

Problem Statement Breakdown

  • Age: Employees aged between 25 and 30.

  • Salary: Employees with salaries greater than or equal to 55000.

  • Department: Exclude employees working in the Finance department.

We'll apply these filter conditions using the Filter Data component to segment the dataset and identify the employees meeting the specified criteria.

Add Rule:

  • Field Selection: Select "Age" column.

  • Logic Condition: Choose "Greater than or equal to (>=)" and "Less than or equal to (<=)". Alternatively, use the "Between" condition, which functions similarly.

  • Input Value: Input 25 as the lower limit and 30 as the upper limit.

Add Group:

  • Field Selection: Select "Salary" column.

  • Logic Condition: Choose "Greater than or equal to (>=)".

  • Input Value: Input 55000 as the threshold salary.

Additional Rule:

  • Field Selection: Select "Department" column.

  • Logic Condition: Choose "Not equal to (!=)".

  • Input Value: Input "Finance" to exclude employees in the Finance department.

Final Logic Representation

('Age' between 25 and 30 and ('Salary' >= 55000 and 'Department' != 'Finance'))

Resultant Output

By applying these filter conditions, we get the desired result.

Employee ID

Name

Age

Department

Salary

101

Alice

30

HR

60000

102

Bob

28

IT

55000

105

Emily

27

Operations

58000

109

Irene

26

Marketing

56000

Last modified: 21 February 2025