Skip to content

GRV XML

Description

The GRV XML processor is designed to execute Groovy expressions that affect the value of data points during the consolidation phase of data processing. This processor is versatile and can be used to perform a wide range of operations on data, including arithmetic calculations, data manipulation, and more. It supports all data types, including BLOBs, making it highly adaptable for various data processing needs.


Config Location

To configure the GRV XML processor, you need to define it within the consDPProcessors section of your data point configuration within the schema. This involves specifying the processor name and entity.


Supported Data Types

  • String
  • Double
  • Decimal
  • Integer
  • Json
  • BLOB
  • Boolean

Config Requirements

Config ({}) options are required for the GRV XML processor. If no configuration is provided or if the configuration is improperly set up, a block violation will be thrown. For more information on Apiro violations and their appearance in the Apiro UI or logs, refer to the violations section.


Example Config

Below is an example of how to configure the GRV XML processor in XML format to check if the data is greater than 50 and set the "ISBIG" data point accordingly:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
<dataPoint name="ISBIG" dataType="BOOLEAN">
    <consDPProcessors>
        <consDPProcessor name="DO_EXPRESSION" entity="GRV_XML">
            <config>
                <![CDATA[
                    {
                        CTX['QUANTITY'] > 50 ? true : false
                    }
                ]]>
            </config>
        </consDPProcessor>
    </consDPProcessors>
</dataPoint>

Example Result

Upon successful configuration and execution, the GRV XML processor will execute the specified Groovy expression on the "QUANTITY" data point, setting the "ISBIG" data point to true if the "QUANTITY" is greater than 50, and false otherwise.


Config Parameters

name acceptable values comment
NA. A Groovy expression that defines the operation to be performed on the data point. The expression can include conditional logic, arithmetic operations, and more.

Common Mistakes

  • Ensure that the processor name and entity are correctly defined in the configuration to ensure that the processor is correctly identified and applied during the data processing pipeline.
  • Verify that the Groovy expression within the <config> tag is correctly written and performs the intended operation on the data point.
  • Remember that the configuration for the GRV XML processor is required. If no configuration, or improper configuration is provided then a block violation will be thrown.