Consumption Analytics Documentation

Home > Documentation for older versions > Cloud Cruiser 3 > Batch XML Reference > Transform processors > CalculateResourceRate


Table of contents
No headers

Sets a pass-through rate on a resource calculated from existing resource values. Any resource already in the record can be used in a free form algebraic expression to compute a rate for the target resource. If the target resource already exists, then it will be updated with the calculated value. Otherwise, it will be added with a value of zero and the calculated rate.

For more information on expression syntax and supported variables, see Expression parser.


<bean class="com.cloudcruiser.batch.transform.CalculateResourceRate">


<property name="expression" value="expression" />

Sets an algebraic expression using resource names as variables where needed. Use parenthesis for explicit order of operations.

<property name="targetResource" value="targetResource" />

Sets a resourceId that will have its value set from the result.

Spring Batch XML Example

<batch:step id="transform" next="charge">
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="processors">
          <bean class="com.cloudcruiser.batch.transform.CalculateResourceRate">
            <property name="active" value="true" />
            <!-- compute rate from cost -->             
            <property name="targetResource" value="DiskGB" />
            <property name="expression" value="DiskGB_COST / DiskGB" />
Last modified


This page has no custom tags.


This page has no classifications.

 (c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP