Skip to content

CONSOLIDATION ALGORITHM - GEN EXPRESS

Description

The GEN_EXPRES consolidation algorithm allows you to specify a groovy script that allows you to impelement any algorithm that meets your requirements. The script is able to access values from specific feeds, historical values or even values from other schemas. It accepts all data types including BLOBs.


Config Location

Config is provided within <consolidationAlgorithm/> element, within the dataPoint element in a schema.


Supported Data Types

  • Double
  • Decimal
  • Integer
  • String
  • BLOB
  • JSON
  • XML

Config Requirements

Config ({}) options are not required.


Config Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<dataPoint name="NAME" dataType="STRING">
    <consolidationAlgorithm name="AGG_CHANGE_NAME" entity="GEN_EXPRESS">
        <config>
            <![CDATA[
                #GRV{
                    CTX['.'] = 'First Name =' + CTX['.']
                }
            ]]>
        </config>
    </consolidationAlgorithm>
</dataPoint>

Example Result

  • data point "NAME" sources the value "John"
  • the algorithm "AGG_CHANGE_NAME" concatenates the string value of "First Name =" to the start of the current value of the "NAME" data point.
  • final value for "NAME" data point: "First Name =Thomas"

Config Parameters

name acceptable values comment
NA. general expression usually a Groovy script

Common Mistakes

  • Config ({}) options are optional. If improper configuration is provided then a block violation will be thrown.
  • See violations for more on Apiro violations and what they look like in the Apiro UI or Apiro logs.