Consumption Analytics Documentation

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


Table of contents
No headers

Adds a shift identifier based on usage time of day. This transform processor will split input records at shift changes that occur within the record’s usage time frame and set a shift identifier value accordingly. This reads shift schedule from flat file in the following format:



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


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

Sets the target identifier.

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

Sets the schedule input.

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

Sets the input resource providing state change records in the format of timeStamp,keyValue,identifierValue.

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

Sets the encoding.

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

Sets the time zone for the shift schedule records so that start times are properly converted to the same time zone as usage data. For the syntax of a custom time zone IDs, see See Time zone syntax..

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

Sets the time pattern.

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

Sets the comment characters.

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.AssignShift">
            <property name="active" value="true" />
            <property name="targetIdentifier" value="shift" />
            <property name="scheduleInput" value="${env.processingDir}/shift_schedule.csv" />
            <property name="scheduleTimeZone" value="GMT-00:00" />
            <property name="encoding" value="UTF-8" />
            <property name="commentChars" value="#" />
            <property name="timePattern" value="HH:mm:ss" />
            <property name="exceptionProcessing" value="true" />
Last modified


This page has no custom tags.


This page has no classifications.

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