SWITCH

In a data query, you can use the SWITCH operator to apply different treatments to different groups.

The SWITCH operator takes a single stream and returns several streams, each containing elements sharing the same expression evaluation.

This page discusses:

See Also
Expression Language
Defining Data Queries

Input

A stream of elements.

Output

N streams of E elements. Each stream contains elements sharing the same expression evaluation. The number of outputs corresponds to the number of cases defined.

General Parameters

Parameter Description
Label

Specify the label to display below the operator type in the data query.

Description

Add a description to display as tooltip on hover over the operator icon.

Tip: It is useful to explain what the operator does, especially when you share the data query with other users.
Operator input variable Specify the name to give to the variable that contains the input data. The variable is then available when you define expressions.

Switch Criteria Parameters

Sorter type Description
Switch value This expression defines the value to use to select the case. For example, input.name.
Cases Define all the output streams going out of the operator.

Example

From one stream with a list of employees, you want to return 2 streams, based on their genders.