Product Features
...
Analytics
Statistical Functions
Switch
3min
The Switch processor sends the content of incoming messages to an output only when rule checks are met.
- Available rules to be checked are:
- == - Equals
- For strings, input value and checked value need to be lexicographically equal.
- != - Not Equals
- For strings, input value and checked value need to be lexicographically different.
- < - Less than
- For strings, input value needs to be lexicographically before checked value.
- <= - Less than, or equals
- For strings, input the value needs to be lexicographically equal to or before the checked value.
- > - Greater than
- For strings, input value needs to be lexicographically after checked value.
- >= - Greater than or equals
- For strings, input value needs to be lexicographically equal to or after checked value.
- is true - Only applicable for fields having Bool data type
- is false - Only applicable for fields having Bool data type
- is null - Given field should not be present in the input
- is not null - Given field should be present in the input
- is of type - Compares the datatype of field with given
- contains - Only applicable for fields having String or JSON data type
- For string datatype, the rules for comparison are done through GoLang strings.compare
- Field Name, Check Value, and Check Value Type Represent what field to look for, for the comparison, what value to check for, and what is the expected type for the mentioned value.
- Output Name is used to restrict/filter where to publish the output to.
- If left empty, output will be published to all connected processors.
Parameters | Details |
---|---|
Rule | The Rule specifies the condition to be checked (e.g., Equals or Not Equals). |
Field Name | The Field Name indicates the specific field in the input message for comparison. |
Check Value | The Check Value is the value against which the Field Name is evaluated. |
Check Value Type | The Check Value Type defines the expected data type of the Check Value. |
Output (Optional) | The Output determines where the result will be published or if it goes to all connected processors if left empty. |
Note: When creating an analytics flow with Switch processor, refer the Use the Switch Processor Function guide for more details.