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 > Batch XML Reference > Transform processors > CCRecordTransformTasklet

CCRecordTransformTasklet

Table of contents
No headers

Executes one or more processors to adjust record contents and/or drop records. Input and output resources must be distinct since this tasklet writes to output while reading input.

Input and output resources do not have to be specified. The default input is the output resource of the previous job step, if any. The default output is located under the active process directory and follows a naming convention of jobName _ selectDate _transformed.ccr . These default resource definitions are part of the execution context loaded when using the ccjob script to launch jobs.

Class

<bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">

Properties

<property name="input" ref="input
" />

Sets the input resource for reading records to be transformed. This defaults to the output resource of the previous job step, if any. Relative paths are assumed to be under the processing directory for the active process.

<property name="output" ref="output
" />

Sets the output resource where the transformed records will be written. This defaults to a jobName _ selectDate _transformed.ccr file in the active process directory. Relative paths are assumed to be under the processing directory for the active process.

<property name="inputRequired" value="false" />

Sets a flag indicating if input is required. If true , then the input must exist else execution will fail. Set to false when an empty or missing input file is expected. The output file will still be created when no input is available and inputRequired is false .

<property name="exceptionOutput" ref="exceptionOutput
" />

Sets a resource for writing out exception records.

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

Sets the maximum number of exceptions that will be written to the job log

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

Sets a limit on the maximum number of processing exceptions that can occur per execution. Once the limit has been reached, the next exception will result in an error. The default is value is zero (0).

<property name="processors">

Sets the record processors that will act on records from input. Each record from input is submitted to each processor in the list until the record is dropped by a processor or written to the output file.

Spring Batch XML Example

<batch:step id="transform" next="charge">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="active" value="true"/>
      <property name="input" ref="defaultAggregationOutput"/>
      <property name="output" ref="defaultTransformOutput"/>
      <property name="inputRequired" value="false"/>
      <property name="exceptionOutput" ref="defaultTransformExceptionOutput"/>
      <property name="exceptionLogLimit" value="20"/>
      <property name="exceptionLimit" value="0"/>
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromIdentifier">
            <property name="targetIdentifier" value="HostVM"/>
            <property name="inputIdentifiers">
              <list>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="Host"/>
                  <property name="start" value="0"/>
                  <property name="len" value="3"/>
                  <property name="suffix" value=":"/>
                </bean>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="VMName"/>
                </bean>
              </list>
            </property>
          </bean>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromTable">
            <property name="translateTitle" value="default"/>
            <property name="sourceIdentifier" value="HostVM"/>
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
</batch:step>
  
<batch:step id="transform" next="transformExceptions">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="active" value="true"/>
      <property name="output" ref="defaultTransformOutput"/>
      <property name="inputRequired" value="true"/>
      <property name="exceptionOutput" value="file:${env.processDir}/${env.jobName}_${env.selectDate}_lookup_exceptions.ccr"/>
      <property name="exceptionLogLimit" value="50"/>
      <property name="exceptionLimit" value="1000"/>
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromIdentifier">
            <property name="targetIdentifier" value="HostVM"/>
            <property name="inputIdentifiers">
              <list>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="Host"/>
                  <property name="start" value="0"/>
                  <property name="len" value="3"/>
                  <property name="suffix" value=":"/>
                </bean>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="VMName"/>
                </bean>
              </list>
            </property>
          </bean>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromTable">
            <property name="translateTitle" value="default"/>
            <property name="sourceIdentifier" value="HostVM"/>
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
</batch:step>
 
<batch:step id="transformLookupExceptions" next="merge">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordTransformTasklet">
      <property name="active" value="true"/>
      <property name="input" value="file:${env.processDir}/${env.jobName}_${env.selectDate}_lookup_exceptions.ccr"/>
      <property name="output" value="file:${env.processDir}/${env.jobName}_${env.selectDate}_transformed_exceptions.ccr"/>
      <property name="inputRequired" value="false"/>
      <property name="exceptionOutput" ref="defaultTransformExceptionOutput"/>
      <property name="exceptionLogLimit" value="0"/>
      <property name="exceptionLimit" value="0"/>
      <property name="processors">
        <list>
          <bean class="com.cloudcruiser.batch.transform.CreateIdentifierFromIdentifier">
            <property name="targetIdentifier" value="HostVM"/>
            <property name="inputIdentifiers">
              <list>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="Host"/>
                  <property name="start" value="0"/>
                  <property name="len" value="3"/>
                  <property name="suffix" value=":"/>
                </bean>
                <bean class="com.cloudcruiser.batch.transform.InputIdentifier">
                  <property name="name" value="VMName"/>
                </bean>
              </list>
            </property>
          </bean>
        </list>
      </property>
    </bean>
  </batch:tasklet>
</batch:step>
 
<batch:step id="merge" next="charge">
  <batch:tasklet>      
    <bean class="com.cloudcruiser.batch.CCRecordMergeTasklet">
      <property name="active" value="true"/>
      <property name="inputs">
        <list>
          <ref bean="defaultTransformOutput" />
          <value>file:${env.processDir}/${env.jobName}_${env.selectDate}_transformed_exceptions.ccr</value>
        </list>
      </property>
      <property name="output" ref="defaultMergeOutput"/>
      <property name="inputRequired" value="true"/>
    </bean>
  </batch:tasklet>
</batch:step>
Last modified

Tags

This page has no custom tags.

Classifications

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