Cloud Cruiser became HPE Consumption Analytics on Nov. 1st. You'll still see the old name in places while we update this site.

 

 

Consumption Analytics Documentation

Home > Cloud Cruiser 3 > Setting Up Collection > Steps for all collectors > Using transform processors > Expression parser

Expression parser

The ExpressionParser utility is an algebraic expression parser that supports variables representing resource values, including passthrough cost and rate values. This is used with the CalculateResource, CalculateResourceCost, and CalculateResourceRate transforms. Use parentheses for specifying the order of operations.

You can use resource names in the expression as variables. If a resource name in the expression cannot be found in the record being processed, a transform exception will occur. Resource names in expressions might not contain any special characters, such as parenthesis, periods, or any operation symbol including boolean operators (= < > & |). It might be necessary to rename resources for use in expressions (and rename back afterwards). Resource names are replaced with the resource value for resolving an expression. You can also reference rate and cost values by appending the resource name with _COST or _RATE (case sensitive). When a variable calls for rate or cost and the resource specified does not have a cost/rate value to substitute, then a transform exception will occur. For more information, see Exception processing.

Supported arithmetic operators

Symbol

Operation

^

Power

+ , -

Unary Plus, Unary Minus

%

Modulus

/

Division

*

Multiplication

+ , -

Addition, Subtraction

Supported conditional operators

Symbol

Operation

==

Equals

!=

Does Not Equal

>

Greater Than

<

Less Than

>=

Greater Than or Equal

<=

Less Than or Equal

&&

AND operator

||

OR operator

Supported functions

Function

Description

max(value1, value2, ...)

Maximum Value

min(value1, value2, ...)

Minimum Value

round(expression)

Rounding (see Rounding resource values)

Last modified

Tags

This page has no custom tags.

Classifications

This page has no classifications.
© Copyright 2018 Hewlett Packard Enterprise Development LP