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.
In the Visual editor Palette, in Streams and Windows, select Compute ().
Select a location in the diagram and click to
add the shape.
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.
Add columns:
Click Copy Columns from Input () in the shape toolbar to copy input fields into the schema for this query.
Add
additional columns by clicking Add Column
Expression in
the shape toolbar.
Edit a column
expression by double-clicking to open the inline editor, by selecting one of the tabs in
the Properties view, or by selecting an expression and pressing
Ctrl+F2 to edit it using the pop-up expression
editor.
Tip:
When entering column names and their datatypes, use
Tab to easily move between cells in the table.
Add column expressions , as necessary.
Modify column expressions by selecting and modifying them directly, or by editing the corresponding fields in the Properties view.
Use the toggle option to designate the compute object as INPUT or
OUTPUT. By default, computes are Output.