Selfuel Docs
  • Welcome to Selfuel Platform
    • Features
    • Capabilities
    • Target Audience
    • $150 Free Trial
  • Registration and Login
  • Platform UI
  • Stream Processing with Cortex
    • Cortex Quickstart Guide
    • Cortex Elements
      • Streams
      • Attributes
      • Mappings
        • 🚧Source Mapping Types
        • 🚧Sink Mapping Types
      • Node and Application Healthchecks
      • Nodes
        • Node Preview
        • Node Connectivites
        • Node Units
      • Expression Builder
        • 🚧Built-in Functions
      • Windows
        • Cron Window
        • Delay Window
        • Unique Event Window
        • First Event Window
        • Sliding Event Count Window
        • Tumbling Event Count Window
        • Session Window
        • Tumbling Event Sort Window
        • Sliding Time Window
        • Tumbling Time Window
        • Sliding Time and Event Count Window
      • Store and Cache
        • RDBMS
        • MongoDB
        • Redis
        • Elasticsearch
    • Applications
      • Applications Page
      • Creating Applications using Canvas
      • Connector Nodes Cluster
        • Source Nodes
          • CDC Source
          • Email Source
          • HTTP Source
          • HTTP Call Response Source
          • HTTP Service Source
          • Kafka Source
          • RabbitMQ Source
          • gRPC Source
          • JMS Source
          • Kafka Multi DC Source
          • JMS Source
          • AWS S3 Source
          • Google Pub-sub Source
          • AWS SQS Source
          • MQTT Source
          • Google Cloud Storage Source
          • HTTP SSE Source
          • WebSubHub Source
        • Sink Nodes
          • Email Sink
          • HTTP Sink
          • HTTP Service Response Sink
          • HTTP Call Sink
          • Kafka Sink
          • RabbitMQ Sink
          • gRPC Sink
          • JMS Sink
          • Kafka Multi DC Sink
          • AWS S3 Sink
          • Google Pub-sub Sink
          • AWS SQS Sink
          • MQTT Sink
          • Google Cloud Storage Sink
          • HTTP SSE Sink
          • WebSubHub Sink
      • Processing Nodes Cluster
        • Query
        • Join
        • Pattern
        • Sequence
        • Processor
        • 🚧On-demand Query
      • Buffer Nodes Cluster
        • Stream
        • Table
        • Window
        • Aggregation
        • Trigger
    • Run Applications
      • Run Applications Using Runners
      • Update Running Applications
      • Application Versioning
  • Data Integration with Nexus
    • Nexus Quickstart Guide
    • Nexus Elements
      • Concept
        • Config
        • Schema Feature
        • Speed Control
      • Connectors
        • Source
          • Source Connector Features
          • Source Common Options
          • AmazonDynamoDB
          • AmazonSqs
          • Cassandra
          • Clickhouse
          • CosFile
          • DB2
          • Doris
          • Easysearch
          • Elasticsearch
          • FakeSource
          • FtpFile
          • Github
          • Gitlab
          • GoogleSheets
          • Greenplum
          • Hbase
          • HdfsFile
          • Hive
          • HiveJdbc
          • Http
          • Apache Iceberg
          • InfluxDB
          • IoTDB
          • JDBC
          • Jira
          • Kingbase
          • Klaviyo
          • Kudu
          • Lemlist
          • Maxcompute
          • Milvus
          • MongoDB CDC
          • MongoDB
          • My Hours
          • MySQL CDC
          • MySQL
          • Neo4j
          • Notion
          • ObsFile
          • OceanBase
          • OneSignal
          • OpenMldb
          • Oracle CDC
          • Oracle
          • OssFile
          • OssJindoFile
          • Paimon
          • Persistiq
          • Phoenix
          • PostgreSQL CDC
          • PostgreSQL
          • Apache Pulsar
          • Rabbitmq
          • Redis
          • Redshift
          • RocketMQ
          • S3File
          • SftpFile
          • Sls
          • Snowflake
          • Socket
          • SQL Server CDC
          • SQL Server
          • StarRocks
          • TDengine
          • Vertica
          • Web3j
          • Kafka
        • Sink
          • Sink Connector Features
          • Sink Common Options
          • Activemq
          • AmazonDynamoDB
          • AmazonSqs
          • Assert
          • Cassandra
          • Clickhouse
          • ClickhouseFile
          • CosFile
          • DB2
          • DataHub
          • DingTalk
          • Doris
          • Druid
          • INFINI Easysearch
          • Elasticsearch
          • Email
          • Enterprise WeChat
          • Feishu
          • FtpFile
          • GoogleFirestore
          • Greenplum
          • Hbase
          • HdfsFile
          • Hive
          • Http
          • Hudi
          • Apache Iceberg
          • InfluxDB
          • IoTDB
          • JDBC
          • Kafka
          • Kingbase
          • Kudu
          • Maxcompute
          • Milvus
          • MongoDB
          • MySQL
          • Neo4j
          • ObsFile
          • OceanBase
          • Oracle
          • OssFile
          • OssJindoFile
          • Paimon
          • Phoenix
          • PostgreSql
          • Pulsar
          • Rabbitmq
          • Redis
          • Redshift
          • RocketMQ
          • S3Redshift
          • S3File
          • SelectDB Cloud
          • Sentry
          • SftpFile
          • Slack
          • Snowflake
          • Socket
          • SQL Server
          • StarRocks
          • TDengine
          • Tablestore
          • Vertica
        • Formats
          • Avro format
          • Canal Format
          • CDC Compatible Debezium-json
          • Debezium Format
          • Kafka source compatible kafka-connect-json
          • MaxWell Format
          • Ogg Format
        • Error Quick Reference Manual
      • Transform
        • Transform Common Options
        • Copy
        • FieldMapper
        • FilterRowKind
        • Filter
        • JsonPath
        • LLM
        • Replace
        • Split
        • SQL Functions
        • SQL
    • Integrations
      • Integrations Page
      • Creating Integrations Using Json
    • Run Integrations
      • Run Integrations Using Runners
      • Integration Versioning
  • Batch Processing/Storage with Maxim
    • Maxim Quickstart Guide
    • Maxim Elements
    • Queries
    • Run Queries
  • Orchestration with Routines
    • Routines Quickstart Guide
    • Routines Elements
    • Routines
    • Run Routines
  • Runners
    • Runners Page
    • Create a Runner to Run Applications
  • Security
    • Vaults
      • Vaults Page
      • Create Vaults
        • Runner-level Vaults
        • Application-level Vaults
      • Edit and Delete Vaults
      • 🚧Utilizing Vaults in Applications and Runners
    • Certificates
      • Certificates Page
      • 🚧Utilizing Certificates in Applications
      • 🟨Setting Up Security Settings
  • Monitoring Performance
    • Dashboard
    • Application Details
    • Runner Details
  • Logging
    • Log Types
  • Cost Management
    • SaaS
      • Pay-as-you-go
        • Hard Budget Cap
        • Soft Budget Cap
      • Subscriptions
    • On-prem
  • Organization Settings
    • General
    • Access Controls
      • User Roles and Privileges
    • Current Costs
    • Billing Addresses
    • Payment Accounts
    • Subscriptions
    • Pricing
    • Invoicing
  • User Settings
  • Troubleshooting
  • FAQs
Powered by GitBook
On this page
  • Step 1 - General
  • Name and Description
  • Attributes
  • Step 2 - Output Actions
  • Connecting At-Least One Output Node
  • Deciding on the Event Type
  • Deciding on the Output Actions
  • i. Insert
  • ii. Update
  • iii. Update or Insert (Upsert)
  • iv. Delete
  • Step 3 - Output Attributes
  • Output Attributes
  • Aggregation Groups
  • Step 4 - Output Relaying Logic
  • Output Filtering
  • Ordering
  • Limit and Offset
  • Step 5 - Output Rate Limiting
  • Output Rate Limiting and Output Event Selection
  • i. Time Based Output Rate Limiting
  • ii. Event Count Based Output Rate Limiting
  • iii. Snapshot Based Output Rate Limiting
  • Step 6 - Preview
  1. Stream Processing with Cortex
  2. Applications
  3. Processing Nodes Cluster

Processor

PreviousSequenceNextOn-demand Query

Last updated 1 year ago

In Cortex, when constructing Applications using Node Units, the Processor Node plays a critical role. Processor Node is required to determine the handling of outputs from input-processing Nodes like Query, Join, Pattern, and Sequence Nodes. It's a key requirement to connect these Nodes with a Processor Node.

Every Query, Join, Pattern, and Sequence Nodes should be connected with a Processor Node to determine output manipulations. (cf. Node Units)

This connection is essential for defining and executing the desired manipulations on the outputs of these processing Nodes, ensuring that the data flow and processing within your Application are coherent and aligned with your objectives.

Step 1 - General

Name and Description

When configuring a Processor Node in Cortex involves several key actions.

  • Assign a unique name to the Node, distinct from other Nodes in your Application.

  • Optionally, add a Description for detail and clarity.

  • The Node Name and Description will help distinguish it in the Canvas via Node Preview.

Attributes

For the Processor Node in Cortex, the Attributes are automatically derived as inputs from Buffer Nodes connected to its left side.

  • Attributes in the Query Node automatically originate from Buffer Nodes to its left.

  • Attributes Table displays a list of Attributes Names, Input Node Names, and Attribute Types for each input attribute.

Step 2 - Output Actions

Connecting At-Least One Output Node

In Step 2 of the Processor Node, it's required to connect at least one output node and define its attributes to its right before proceeding.

You can connect more than one output node to the right of the Processor Node.

  • You need to connect at least one output node to Processor to continue.

  • This output node may be a Sink or a Buffer Node (Stream, Table and/or Window).

  • You also need to define output nodes' attributes also.

In Processor Node's Step 2, it's crucial to connect to an at least one output node and define its attributes to proceed (either a Sink Node or a Buffer Node) to the Processor Node. Failure to establish this connection will result in an error message.

Deciding on the Event Type

After you connect at least one output node; you will now decide on the "freshness" of events that will be sent to the output node. Event Type choice is where you define "freshness" that is defined via Window Expiry.

"Fresh" events are called Current Events that have not expired and are within the temporal or quantitative bound that a window constitutes.

Any input node that incorporates a window also accommodates some "expired" events as windows keep events based on a time/quantity condition (cf. Windows). As these expired events have already expired due to Window Expiry; they are considered "stale/not-fresh" compared to Current Events that have not expired yet.

Windows additionally accommodate Expired Events along with Current Events that are considered "fresh" in their Window Queue.

Event Type is crucial for identifying which type of events will be relayed to the output node when an input node should send these events.

You should select an Event Type if you have a Window Node or have enabled windows in the Query Node.

Event Type
Description

Current Events

Only events that are actively within the input node window's defined criteria will be sent to the output node.

Expired Events

Only events that were once current but have now exceeded the window's criteria will be sent to the output node.

All Events

Both current and expired events at the window will be relayed to the output node.

Deciding on the Output Actions

After you decide on the Event Type for windows, you will now decide with Output Actions on the output node(s). This is where you determine the relay action to the output node.

  • Allowed output actions to the output node(s) depends on the type of the output node.

  • If only Insert action is allowed for the output node, you need not to make a decision.

Type of Output Node
Allowed Output Actions

Stream/Sink

Insert

Table

Insert, Update, Update or Insert (Upsert), Delete

Window

Insert

i. Insert

Lets the input attributes to be inserted into the output nodes with the logic that will be decided on following Steps.

If you decide to select Insert as Output Action; you can continue to the next Step:Step 3 - Output Attributes.

ii. Update

Allows some or all output Table Node attributes to be updated.

You can only update attributes of an output node only if it is a Table Node.

Optional Update Condition

Allows an output Table Node attributes to be updated based on an optional Update Condition.

Without an Update Condition, all events in the output Table Node will be updated.

  • Update Condition determines how events are selected for updating.

  • When using table attributes in the Update Condition, they must be referenced with the table name.

We strongly encourage that you utilize Connected Node Attributes top-most section of the Expression Builder in order to properly utilize output Table Node's attributes.

Optional Set Conditions for Output Table Attributes

The Set Conditions allows selective updating of output Table Node attributes. Here, each assignment's left side specifies the attribute to update, while the right side can include various elements like query output attributes or mathematical operations. You can use Expression Builder to construct Set Conditions.

If any Set Conditions are not utilized for any output Table Node attribute, all output Table Node attributes are updated based on the Update Condition.

iii. Update or Insert (Upsert)

Allows all output Table Node attributes to be updated or inserted unless they exist based on an optional Update or Insert Condition.

You can only update or insert the attributes of an output node only if it is a Table Node.

Optional Update or Insert Condition

Allows all output Table Node attributes to be updated or inserted based on an optional Update Condition.

Without an Update or Insert Condition, all events in the output Table Node will be updated.

  • Update or Insert Condition determines how events are selected for updating or insertion.

  • When using table attributes in the Update Condition, they must be referenced with the table name.

We strongly encourage that you utilize Connected Node Attributes top-most section of the Expression Builder in order to properly utilize output Table Node's attributes.

Set Conditions for Output Table Attributes

The Set Conditions allows updating or inserting of all output Table Node attributes. Here, each assignment's left side specifies the attribute to update, while the right side can include various elements like query output attributes or mathematical operations. You can use Expression Builder to construct Set Conditions.

Different from an Update operation; when utilizing Update or Insert you must Set Conditions for all output Table Node attributes.

iv. Delete

Allows to delete output Table Node attributes based on a Delete Condition if specified.

You can only delete attributes of an output node only if it is a Table Node.

Optional Delete Condition

Allows some output Table Node attributes to be deleted based on an optional Delete Condition.

BE CAREFUL: Without a Delete Condition, the table in the output Table Node will be deleted.

  • Delete Condition determines how events are selected for deletion.

  • When using table attributes in the Delete Condition, they must be referenced with the table name.

We strongly encourage that you utilize Connected Node Attributes top-most section of the Expression Builder in order to properly utilize output Table Node's attributes.

Step 3 - Output Attributes

Output Attributes

On Output Attributes section, you will create mappings between input and output nodes' attributes.

All output node attributes must be defined via an expression that use input node atttributes.

You may refer to the Expression Builder and Built-in Functions sections to see how you can embed processing logic to your output node attributes.

When dealing with multiple output nodes, the attributes are grouped based on their respective output Node Names. You are required to define expressions for each attribute across all output nodes, ensuring a precise mapping and functional alignment between inputs and outputs.

Aggregation Groups

After you create mapping between input and output node attributes; you will now decide on the Aggregation Groups if you need any.

To add an Aggregation Group click the Add Aggregation Group button. Using the dropdown menu you can decide which output node you want to create Aggregation Group(s) for.

Any Input node that incorporates a window also clusters multiple events of every attribute based on a time/quantity condition (cf. Windows). Aggregation Groups lets you aggregate windowed events based on their attributes.

When input node attributes are already subjected to any windowing as they arrive; they can also be aggregated based on one or more attributes.

Aggregation Gorups becomes activated if you have a Window Node or have enabled windows in the Query Node.

Output Actions SSs incomplete

Step 4 - Output Relaying Logic

In this Step, you can decide to put Output Filtering to filter outputs, Ordering to order output attributes in an ascending/descending order, and/or impose Limit and Offset to output node attributes.

To add an Output Filter, Ordering, and/or Limit and Offset to any output node, click on the Add Buttons that will give a dropdown menu of the connected output nodes.

You can select any combination of Output Relaying Logic elements to any of the output nodes connected to suit your requirements.

Output Filtering

Output Filtering is used to filter events at the query output based on specified conditions applied to the output node attributes. This function is versatile, accepting various types of conditions, including combinations of output node attributes, constants, and built-in functions that yield a Boolean result.

Expression Builder can be utilized to create a filter using output node attributes.

When the Output Filtering evaluates to true, events are allowed to pass through; if it evaluates to false, the events are dropped. This feature is essential for refining the data that flows through the application based on specific criteria.

Ordering

Ordering is used to sort output node attributes based on one or more specified attributes. It defaults to ordering the events in ascending order.

Any Input node that incorporates a window also clusters multiple events of every attribute based on a time/quantity condition (cf. Windows). Ordering lets you order windowed events in ascending or descending order.

When input node attributes are already subjected to any windowing as they arrive; they can also be ordered based on one or more attributes.

  • Ordering output node attributes can be done by selecting either Ascending or Descending order.

  • This function is crucial for organizing query results in a structured manner, according to your specified criteria.

BE CAREFUL: There exists an order of precedence in each Ordering for the output node attributes. The first Ordering takes precedence before the second, the second ordering before the third, and so on.

Limit and Offset

Limiat and Offset lets you select a limited number of output events as output to be relayed to tne output node.

Any Input node that incorporates a window also clusters multiple events of every attribute based on a time/quantity condition (cf. Windows). Limit and Offset lets you limit the number of output events and

When input node attributes are already subjected to any windowing as they arrive; the number of output node events can be restricted with Limit(s) and Offset(s).

  • Limit allows you to specify the maximum number of events to relay to the output node.

  • Offset determines the starting point in the event sequence.

You can only impose a Limit condition. You need not to set a complementing Offset condition to every Limit condition.

e.g. For a Limit = 3 and Offset = 8 condition; only 9th, 10th, an 11th events will be relayed to the output node.

e.g. For a sole Limit = 10 condition, only 10 events will be relayed to the output node.

This feature is useful for managing and manipulating data chunks produced by queries, enabling more controlled and specific data processing and analysis.

Step 5 - Output Rate Limiting

In this Step, you can decide to put Output Rate Limiting to control the frequency of events to be relayed to the output node. This limitation can be based on time or a specified number of events. The mechanism for selecting which output events are sent from the query is determined by the

To add an Output Rate Limiting to any output node, click on the Add Rate Limiting button that will give a dropdown menu of the connected output nodes.

You can select only one type of Rate Limiting for each connected output node.

BE CAREFUL: Output Rate Limiting essentially defines how the events will be sent together to the output node.

Output Rate Limiting and Output Event Selection

Three different types of Output Rate Limiting are directly correlated with the Output Event Selection. Before delving into details of Output Event Selection, we first present you the three types of Output Rate Limiting.

Output Rate Limiting Type
Description

Time Based

Outputs events together according to the Output Event Selection within every Time Interval.

Event Based

Outputs events together according to the Output Event Selection for every Event Count.

Snapshot Based

Outputs all events together already windowed for every given Time Interval.

Output Event Selection determines which events events will be sent together to the output nodes.

Output Event Selection Type
Description

First

Outputs together the very first event(s) in the specified Time Interval or Event Count is emitted.

Last

Outputs together only last event(s) in the specified Time Interval or Event Count is emitted.

All

Outputs together all events within the Time Interval or Event Count.

i. Time Based Output Rate Limiting

Time Based Output Rate Limiting requires a Time Interval and relays events to the output node.

Output Event Selection Type
Description

First

Outputs only the very first event in the specified Time Interval.

Last

Outputs only the last event in the specified Time Interval.

All

Outputs together all events within the Time Interval.

ii. Event Count Based Output Rate Limiting

Count Based Based Output Rate Limiting requires an Event Count and relays that many events to the output node.

Output Event Selection Type
Description

First

Outputs together the very first events as many as the Event Count. (Iff Event Count is bigger than 1)

Last

Outputs together only the last events as many as the Event Count. (Iff Event Count is bigger than 1)

All

Outputs together all events as many as the Event Count.

(Iff Event Count is bigger than 1)

iii. Snapshot Based Output Rate Limiting

Snapshot Based Output Rate Limiting requires a Time Interval and can be applied to attributes from an input node that incorporates a window. Any input node that incorporates a window also clusters multiple events of every attribute based on a time/quantity condition (cf. Windows).

Snpashot Based Output Rate Limiting is only applicable if the input attributes are already-windowed.

Output Event Selection Type
Description

First

Outputs only the already-windowed very first event in the specified Time Interval

Last

Outputs only the already-windowed last event in the specified Time Interval.

All

Outputs together all already-windowed events within the Time Interval.

Snapshot-based Rate Limiting SS incomplete

Step 6 - Preview

In Preview Step, you're provided with a concise summary of all the changes you've made to the Processor Node. This step is pivotal for reviewing and ensuring that your configurations are as intended before completing node setup.

  • Viewing Configurations: Preview Step presents a consolidated view of your node setup.

  • Saving and Exiting: Use the Complete button to save your changes and exit the node and return back to Canvas.

  • Revisions: Use the Back button to return to any Step of modify node setup.

The Preview Step offers a user-friendly summary to manage and finalize node settings in Cortex.