Creating and Modifying Join Queries

Produce a simple query that combines fields from multiple input events into a single output event.

  1. In the Visual editor Palette, in Streams and Windows, select Join (join_template.gif).
  2. Select a location in the diagram and click to add the shape.
  3. Connect the join object to the streams or windows that provide the inputs to the join.
    Connect join objects to two or more streams, windows, or Flex operators. Join objects can take input from two or more objects, but can produce only one output.
    Note: Streams, windows and delta streams can participate in a join. However, a delta stream may participate in a join only if it has a KEEP clause specified. Only one stream can participate in a join. For details of supported joins, see the CCL Programmers Guide.
    Tip: To add multiple connections, Shift+click and hold the Connector tool and add connections. To return to normal selection, press Esc or click the Select tool in the Palette to release it.
  4. Use Copy Columns from Input copycolumn.gif to select input fields to include in the output of this query.
  5. Add column expressions compute_template.gif, as necessary.
  6. Edit a column expression by double-clicking to open the inline editor, or by selecting one of the tabs in the Properties view.
    Or, edit the corresponding fields in the Properties view.
    Tip: When entering column names and their datatypes, use Tab to easily move between cells in the table.
  7. Click Add Join Condition join_template.gif to specify the columns to use to match incoming events across the different sources.
    Complete the Edit Join Expression dialog to define the join type, data sources for the ON clause, and any other join constraints.
    If you do not see the columns you want in the Edit Join Expression dialog, ensure you have connected the join object to the correct input sources.
  8. To join a column to itself, click Add Input Alias Add Input Alias in the shape toolbar.
    A column alias is required to provide a unique name for each join condition.
  9. (Optional) Use the toggle stream.gif option to designate the join object as LOCAL or OUTPUT. By default, joins are Output.
  10. (Optional) Select Set Keep Policy retention_window.gif and choose an option.
    To edit the keep policy, right-click the input window or stream in the Inputs menu. Select Set Keep Policy to add a keep policy, and Delete Keep Policy to remove it.
Related concepts
Simple Queries
Specifying a Retention Policy
Join Types and Restrictions
Related tasks
Creating and Modifying Filter Queries
Creating and Modifying Aggregate Queries
Creating and Modifying Compute Queries
Creating and Modifying Union Queries
Creating and Modifying Pattern Queries