The following processor nodes are available in Event Processing:
Note: If you are on Event Processing version 1.0.4 or earlier, see the information about the aggregate and the top-n nodes in the Windowed section.
Filter
A filter node takes in a stream of events and applies an expression to determine which events to allow to pass and which to block. The output of the filter node is a single stream of events that can be used for analysis or other processing. This node helps to reduce the amount of data by allowing events that match the expression.
Adding a filter node
To add a filter node, complete the following steps.
- Ensure that a stream of events is available, from an Event Source node or from the output of any previously configured node.
- In the Palette, under Processors, drag the Filter node into the canvas.
- Connect the node to an event source by dragging the Output Port from a source node into the Input Port of this node. A purple checkbox is displayed on the filter node indicating that the node is yet to be configured.
- Hover over the node and click Edit to configure the node.
The Configure a Filter window appears.
Configuring a filter node
To configure a filter node, complete the following steps.
- In the Details section, enter a name for your node. The output stream of events from this node will be referred with the name you entered.
- Click Next to open the Define Filter pane.
-
Enter an expression in the Filter Expression text box to filter the events. The expression consists of a property, a mathematical condition, and a value. You can create a simple expression with one condition or a complex expression with multiple conditions based on your requirement. You can create multiple conditions within an expression by using
AND
orOR
.Examples:
-
simple expression:
example_property > 100
-
complex expression:
example_property1 > 50 AND example_property2 > 30 OR example_property3 < 25 AND example_property4 < 250
Note: Expressions are prioritized based on operator precedence.
Alternatively, you can use the assistant to create an expression. Select Assistant at the right end of the text-box to open the assistant. The assistant provides a drop-down list of properties and conditions that you can use to create the expression.
-
- Scroll down and click the Configure Filter button to complete the configuration.
A green checkbox appears on the filter node if the node is configured correctly. If there is any error in your configuration, a red checkbox appears.
User actions are saved automatically. For save status updates, see the canvas header.
- Saving indicates that saving is in progress.
- Saved confirms success.
- Failed indicates that there are errors. If an action fails to save automatically, you receive a notification to try the save again. Click Retry to re-attempt the save. When a valid flow is saved, you can proceed to run the job.
If you are running versions earlier than 1.0.5, click Save in the navigation banner to save the flow.
Transform
A transform node takes in a stream of events to modify your existing properties or create new properties. Existing properties can be removed or renamed, and new properties can be added. The value of a new property is determined by the expression you create.
Transform node supports various functions to create an expression. For more information about functions, see the Flink documentation.
Adding a transform node
To add a transform node, complete the following steps.
- Ensure that a stream of events is available, from an Event Source node or from the output of any previously configured node.
- In the Palette, under Processor, drag-and-drop the Transform node into the canvas.
- Connect the node to an event source by dragging the Output Port from a source node into the Input Port of this node. A purple checkbox is displayed on the transform node indicating that the node is yet to be configured.
-
Hover over the node and click Edit to configure the node.
The Configure Transform window appears.
Configuring a transform node
To configure a transform node, complete the following steps.
- In the Details section, enter a name for your node. The output stream of events from this node will be referred with the name you entered.
- Click Next to open the Create properties pane.
- Click Create new property to add a new property to the table.
- Hover over the property name and click the Edit icon and enter a name for your property.
- Enter your expression in the Expression text box to define your property.
- (Optional) To use the assistant to enter an expression, complete the following steps.
- Click the Assistant drop-down menu to open the assistant.
- In the Select function drop-down menu, select a function with which you want to create an expression.
- In the function you selected previously, enter the required values.
-
Select Insert into expression to add the expression in the text-box.
Note: Ensure you choose the values with correct data type for your expression. Properties that are used as values in the comparison operations must be of the same data type. Arithmetic operations are only allowed on integer and double data types. String operations are only possible with properties of string data type. Some temporal functions require a timestamp data type.
- (Optional) Repeat steps 3 - 6 to create more properties.
- Click Next to open the Output properties pane. You can manage the properties that come from this node to suit your requirements.
- (Optional) To remove a property so that it is not displayed in the output, click the Remove property icon .
- (Optional) To rename a property, hover over the property name and click the Edit icon .
- In the text-box, enter a new name for your property.
- Click outside the text-box or press Enter on your keyboard to rename the property.
- (Optional) To add a property that was previously removed, go to the Properties to remove table that lists the removed properties.
- In the property you want to add back, click the add icon .
- To complete the transform node configuration, click Configure.
A green checkbox appears on the transform node if the node is configured correctly. If there is any error in your configuration, a red checkbox appears.
User actions are saved automatically. For save status updates, see the canvas header.
- Saving indicates that saving is in progress.
- Saved confirms success.
- Failed indicates that there are errors. If an action fails to save automatically, you receive a notification to try the save again. Click Retry to re-attempt the save. When a valid flow is saved, you can proceed to run the job.
If you are running versions earlier than 1.0.5, click Save in the navigation banner to save the flow.