The Route function can be used to apply different conditions on how data is handled depending on the value. This is a processor. It is recommended that the configuration be completed before connecting other processors or forwarders. The order in which each condition is added is the order in which each condition is applied to the input.
When multiple conditions are added to the Route function, you can re-order any condition by drag and drop method using the icon on the Condition box.
To configure the Route function, the following is required:
Field | Description |
---|---|
Field | The input from the function preceding the Route function node in the stream. You can either customize the input field or select from the predefined options. |
Expression | The mathematical conditions to compare values and expressions. The available conditions are:
|
Value | The value that you want to enter for the condition. |
For the Route function to import the data from the preceding function(s) connected to it, a preview must be generated.
To generate a preview, take the following steps for configuring the condition(s):
- In Field, select an option from the drop-down list which is populated with the input from the function preceding the Route function in your stream.
- In Expression, specify the condition or if you select Regexp, enter the regular expression that you want to apply in Value. Standard regular expressions are supported.
- In Value, specify the value or the regular expression depending on the function preceding the Route function.
- To add a new condition, you can click the +New Condition button.
Note | ||
---|---|---|
| ||
|
Some examples for using the Regexp option in Expression:
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
If you have the following input:
When you enter
When you enter
|
The Route function also enables you to be able to handle data that is not matched with any of the conditions that you might have configured. In Handling of unmatched records, the available options are:
- Discard: Discards the unmatched data
- Create new output: Creates a new output with the name default and adds it to the Route function in the stream editor.