Creating and Modifying Simple Queries: Compute

Produce a simple query that transforms the schema or field values of each incoming record. Each incoming event produces one new output event from the fields defined by the column expressions.

  1. In the Visual editor Palette, in Streams and Windows, select Compute (compute_template.gif).
  2. Select a location in the diagram and click to add the shape.
  3. Attach the compute object to the stream or window that provides input to this query.
    Attach compute objects to any stream, window, or Flex operator. Compute objects can have only one input. Any attempt to connect more than one input source is blocked.
  4. Add columns:
    1. Click Copy Columns from Input (copycolumn.gif) in the shape toolbar to copy input fields into the schema for this query.
    2. Add additional columns by clicking Add Column Expression compute_template.gif in the shape toolbar.
    3. Edit a column expression by double-clicking to open the inline editor, or by selecting the expression and pressing Ctrl+F2 to open it in the pop-up editor.
  5. Add column expressions compute_template.gif, as necessary.
  6. Modify column expressions by selecting and modifying them directly, or by editing the corresponding fields in the Properties view.
  7. Use the toggle stream.gif option to designate the compute object as LOCAL or INPUT.
Related concepts
Simple Queries