Join

Join Nodes enable the merge of data by linking events from two Nodes, which can be either Source or Buffer Nodes. Events from different Nodes such as Stream, Window, Table, Aggregation and Source Nodes can be merged with a Join Condition. Also, the selection of the Join Type is a critical step that depends on the types of the input nodes, affecting the available join options.

The configuration also involves specifying a Join Condition, which is crucial for defining how records from the left and right nodes are combined. Omitting the Join Condition results in a Cross Join, where each event from one stream is matched with all events in the other, potentially increasing output volume significantly. Setting a precise Join Condition ensures that the data is merged according to specific requirements, optimizing the relevance and efficiency of the output.

Step 1 - General

Name and Description

When configuring a Join 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 Join Node in Cortex, the Attributes are automatically derived as inputs from Sink or Buffer Nodes connected to its left side.

  • Attributes in the Query Node automatically originate from Sink or 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 - Left Input Processing Logic

Select Left Join

You should select which Input Node should be selected as the Left Join.

Selecting the Left join automatically configures the Right Join in the Step 3.

  • If you want to reverse Left or Right Input Nodes you should get back to Step 2 to do so.

  • In some cases, the Left and Right Join selection may directly affect the output you receive.

Enable Filter (for Left Join)

To create an input filter using the Left Join Attributes, activate the toggle next to Enable Filter.

You can refer to Expression Builder to learn how to create a filter using the Expression Builder.

Enable Window (for Left Join)

To create a window to group Left Join Attributes, activate the toogle next to the Enable Window.

By selecting a Window Type from the dropdown, you can group incoming events with different time, quantity, order, or count constraints you require.

You can refer to Windows to learn how to effectively choose and create windows.

Step 3 - Right Input Processing Logic

Here, the Right Join is selected automatically as one of the two input nodes are selected as the Left Join in Step 2.

If you want to reverse Left or Right Input Nodes you should get back to Step 2 to do so.

  • In some cases, the Left and Right Join selection may directly affect the output you receive.

Enable Filter (for Right Join)

To create an input filter using the Right Join Attributes, activate the toggle next to Enable Filter.

You can refer to Expression Builder to learn how to create a filter using the Expression Builder.

Enable Window (for Right Join)

To create a window to group Right Join Attributes, activate the toogle next to the Enable Window.

By selecting a Window Type from the dropdown, you can group incoming events with different time, quantity, order, or count constraints you require.

You can refer to Windows to learn how to effectively choose and create windows.

Step 4 - Join Type and Conditions

At Step 4 of a Join Node , you are tasked with making key decisions about how the Input Nodes will be joined.

  • If one or more streams are connected as Input Nodes, you can choose a stream to be unidirectional.

  • Then you decide on the Join Type and define Join Conditions for Input Nodes.

Enable Unidirectional Stream

Typically, events arriving on either connected stream can trigger the join operation, resulting in an output.

  • Default Join Behavior: Events from either stream usually can trigger the join operation, producing output.

  • Deciding on a unidirectional stream changes this behavior: Only the stream selected as unidirectional triggers the join operation.

  • The other stream, without the a unidirectional state, updates only its window state without triggering the join or producing output.

You can select only one Stream Node to be unidirectional. This is because as default behavior of the Join Node already permits both streams to trigger the join operation. Applying the unidirectional keyword to both would contradict this default functionality.

Join Type

In the next step of configuring a Join Node in Cortex, you'll select the preferred Join Type for your input nodes. Remember, the two input nodes to a Join Node can be either a Source or a Buffer Node. The type(s) of input nodes influences the available join types. You can refer to the provided table below.

Right Join

Right Join

Right Join

Right Join

Stream/ Source

Table

Window

Aggregation

Left Join

Stream/ Source

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

Left Join

Table

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

Not Allowed

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

Not Allowed

Left Join

Window

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

  • Inner Join

  • Left Outer Join

  • Right Outer Join

  • Full Outer Join

  • Cross Join

Not Allowed

Left Join

Aggregation

Not Allowed

Not Allowed

Not Allowed

Not Allowed

Join Condition

Specify the Join Condition to establish the rules for combining records from your Left and Right Join Nodes. This condition is pivotal in determining the behavior of the join operation, ensuring that records are merged in a manner consistent with your data requirements.

Step 5 - Preview

In Preview Step, you're provided with a concise summary of all the changes you've made to the Join 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.

Last updated