Adding a Calculation Operator
The calculation operation will calculate a field and add the result as an additional field. Usually, input fields pass through an operation, but calculations can also be set to replace existing fields or simply remove them.
- On the Application page, click
and select Calculation
in the Add Operator pane.
The Calculation node
icon displays in the Graph pane, as well as the properties to be defined in the Operator Settings pane, and the preview of the data in the Schema pane.
This operator has left (inbound) and right (outbound) edges that allow connection to other operators in the application.
- In the Operator Settings pane, define or select the following required properties:
Property Description Node ID
The ID of the calculation operator.
Inputs
Automatically connects to the currently-selected operator.
You can select another ID of the operator that will be the source of the data in the Inputs drop-down list.
The preview of the data (INPUT and OUTPUT) are displayed in the Schema pane.
Fields List
Set of fields (with actions and expressions). Enter at least one calculated field. Proceed to step 3
- Enter the Field Name and the Expression that will be evaluated for each incoming record.
To use the expression builder, click the New Expression
icon.
The Expression <Field Name> dialog displays.
Build an expression by double-clicking in the list of Functions, Fields, and Columns.
You can also click on a function and operator then
.
To search for a particular column or function, enter it in the Search Fields/Search Functions box.
Or enter one or more characters/alphabets into the Search Fields box and the suggested list of columns that matched the entries will be displayed.
For example, after entering Numeric, the list will be displayed such as below:
Click
. The new expression is added to the field instance.
- Select any of the following actions: Add, Replace, or Remove.
- Click
to add a new field entry and repeat steps 3 and 4.
The OUTPUT schema is updated based on the added calculations.
You can also:
- Select the topmost checkbox to select all of the fields
- Change the order of the fields by selecting a field’s checkbox and clicking either the
or
button
- Delete a field entry in the Field List by selecting its checkbox and clicking
- Save the changes.
Example
(c) 2013-2024 Altair Engineering Inc. All Rights Reserved.