0

Data Calculations

  • updated 4 yrs ago

Description

The part returns the sum, avg, min, max, or count of database records from the database.

Use

The part can be used to return aggregated values from a data table with selection criteria.

Editor Fields

Field Name

Description/Use

Type/Options

Optional/Mandatory 

Group

This is the collection name where the returned data will be stored.

Text

Mandatory

Data source(s)

This is the collection of the data source(s) name in tge database. Each source name corresponds to an item in the FROM clause in the SQL query. For example, select * from tb1, tb2, tb3;.

Collection

Mandatory

Selection

This is the filter query of the data. It corresponds to the WHERE clause in the SQL query. For example, select * from tb where tb.id>0

Collection

Optional

Columns

Specify the return data columns and their aggregated type. Five aggregated types are provided in the dropdown list, sum, avg, min, max, and count. For example, in SQL query, it is like the following: select sum(value), avg(value), min(value), max(value), count(value) from temperature.

Collection

Mandatory

Log data object

This is the data object that stores the error messages from the execution of the database parts: add data record, get data record, update data record, delete data record, and import values. Hence, when the log data object is specified, the error message and stack trace of a database part will be stored to the object in case of errors.

When used by multiple database parts, the Log data object will store the cumulative list of error messages from the different parts.

Text

Optional

Reset log data object

When this is checked the system will clear the error messages from the Log data object. Typically, this option should be checked in the first database part of a sequence of database parts.

Checkbox

Optional

Skip on error

When this is checked the system will skip the execution of subsequent database parts linked to the same Log data object. 

Checkbox

Optional

Example

Download and import the following example project in your workspace. 

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 4 yrs agoLast active
  • 24Views
  • 3 Following

Home