Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The You can use the Route processor -type Function can be used function to apply different conditions to the data handling depending based on its value. 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 Functionfunction, you can re-order any condition by drag and drop method using the  icon on the Condition box.

To configure the Route Function, The Route function has the the following is requiredsettings:

FieldSetting

Description

Field

The input from the Function function preceding the Route function in the stream. You can select the field from the drop-down list or type the field into the Add field box and click the + button. 

Expression

The mathematical conditions to compare values and expressions. The available conditions are: 

  • Less than

  • Equal to

  • Not equal to

  • Greater than

  • List lesser than

  • List equal to

  • List greater than

  • Regexp

Value

The value that you want to enter for the condition.

For You must generate a preview to enable 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 configure the condition(s) by following these steps:

  1. In Field, select an option from the The Field drop-down list which is populated with the input from the function preceding the Route function in your stream. Select one of the options in the drop-down list. 

  2. In In the Expression field, specify the condition or if you select Regexp, enter the regular expression that you want to apply in Value. Standard regular expressions are supported.

  3. In In the Value field, specify the value or the regular expression depending on the function preceding the Route function. 

  4. To add a new condition, you can click the +New Condition button.

Note!

  1. Data is checked for matching against each condition only in the order in which the conditions are arranged in the configuration. For example, if the data matches the first condition, it is sent via the Output that you enter for that condition. If the data does not match with the first condition, it is checked to match against the second condition or the third condition, and so on.

  2. If the data checked for matching in two or more conditions overlap, then the condition that is first in the order is considered.

Some examples of using the Regexp option in Expression:

Info

Examples - Using regexp

If you have the following input:

Code Block
shipment cost 
cost of shipment 
Shipment cost: 
SHIPMENT 

When you enter shipment, the result is:

Code Block
shipment cost => true
cost of shipment => true
Shipment cost: => false
SHIPMENT => false

When you enter [Ss]hipment, the result is:

Code Block
shipment => true
Shipment => true
Shipment cost: => true
SHIPMENT => false

[a-zA-Z] - Matches all lowercase and uppercase letters

\w+ - Matches any word character (alphanumerical or underscore) with at least one length

The Route Function 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:

...