v26.01: Working with Calculation Node
Calculation nodes transform data from upstream nodes using various methods. The Calculation category provides six transformation approaches, with Script currently active for SQL-based processing.
Available Calculation Node Types
Node Type |
Description |
|---|---|
Formula |
Creates formula-based transformations using formula syntax similar to spreadsheet formulas. |
Script |
Writes SQL-based transformations using standard SQL query syntax. |
PlayBook |
Uses playbook transformations for complex multi-step processes with predefined logic. |
Mapping |
Configures mapping transformations for field-level data mapping between structures. |
Functions |
Applies function-based transformations using predefined or custom functions. |
Rules |
Defines rule-based transformations for applying business logic and conditional processing. |
Configuration Layout (Script)
The Script calculation node provides SQL-based data transformation capabilities.
Field |
Description |
Required |
|---|---|---|
Name |
Unique identifier for the node within the workflow. Must follow standard naming validation rules. |
Yes |
Update Method |
Transformation method selector. Currently displays Script as the active option. Other methods will appear as they become available. |
Yes |
Input |
Defines which upstream nodes provide data to the calculation. Can include Read nodes or other Calculation nodes from the current workflow. Multiple inputs are supported. |
Yes |
Query |
SQL transformation logic using standard SQL syntax. Large text area supports multi-line statements. |
Yes |
Input Node Selection
The Input section defines data sources for the calculation. Click Add to open the node selector, which displays all Read nodes and existing Calculation nodes within the current workflow. Selected nodes appear in the Input field with X icons for removal. Multiple input nodes can be selected to support complex transformations requiring data from multiple sources.
When input nodes are selected:
- The grid viewer below the canvas displays the input node structure.
- Context members from input nodes appear automatically in the Level 2 header.
- These context members represent the union of dimensional context from all selected inputs.
- Changes to upstream nodes (renames, configuration updates) reflect automatically in the Calculation node.
- If an input node is deleted, it automatically removes from the Input field and displays a warning icon.
Query Syntax
SQL queries in the Query section use specific syntax to reference input nodes and dimensions.
Reference Type |
Syntax |
Example |
|---|---|---|
Input Nodes |
{{node_name}} |
{{Read_Revenue}} |
Dimensions |
${dimension_description} |
${Product} |
Supported SQL Operations
- SELECT statements for column selection.
- JOIN operations for combining input sources.
- WHERE clauses for filtering.
- GROUP BY for aggregations.
- ORDER BY for sorting.
- Standard SQL functions and expressions.
Query Validation and Testing
The system provides validation and testing capabilities before finalizing the calculation.
To validate query syntax:
- Enter SQL query in the Query text area.
- Click Validate button.
- If valid: Success message appears.
- If invalid: Error messages display with syntax issue details.
To test query execution:
- After validation passes, the Run button becomes enabled in the Level 2 header.
- Click Run to execute the query against current input data.
- Results appear in the grid viewer below the canvas.
- Review results to verify transformation logic produces expected output.
Note: Calculation nodes can be published with blank or invalid queries. The system displays a warning icon on the configuration panel with "Missing/Invalid query" message on hover. This allows users to save work in progress without blocking the publish operation.
Publishing Calculation Nodes
Click Publish in the Level 2 header to save the node configuration.
The system saves the configuration regardless of query validity. After publishing, additional controls become available: Refresh (reloads grid to reflect changes) and Run (executes query when valid).