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 > CreateIdentifierFromIdentifier

CreateIdentifierFromIdentifier

Table of contents
No headers

Creates a new identifier from one or more existing identifiers. The target identifier is described by InputIdentifier objects which specify existing identifiers along with options for extracting and concatenating. The resulting value is assembled by concatenating the value extracted for each InputIdentifier in the order provided. Each record processed must contain all the specified input identifiers or a transform exception will occur.

String Manipulation

Many string manipulation functions can be performed on an input identifier value. The resulting value can be used to construct a new identifier value or to replace the existing value. To effect an existing identifier, set the same identifier name as both target and input. For more information on how to perform various functions, such as substring and truncation, see Creating new identifiers.

Class


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

Properties


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

Sets the InputIdentifier objects that describe how to assemble a new identifier value.


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

Sets the name of an identifier for the new, translated value.


<property name="overwrite" value="true" />

Sets the flag to overwrite the target identifier value if it already exists in the record being processed. If true, the target value is always created by this processor. Otherwise, an existing value is left alone and a new value is only created for records that do not already contain the target identifier.

Spring Batch XML Example


<batch:step id="transform" next="charge">

  <batch:tasklet>      

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

      <property name="processors">

        <list>

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

            <property name="filter">

              <bean class="com.cloudcruiser.batch.filter.IdentifierExistsCondition">

                <property name="identifierName" value="VMName" />

              </bean>

            </property>

            <property name="targetIdentifier" value="HostVM" />

            <property name="active" value="true" />

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

            <property name="exceptionProcessing" value="true" />

            <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="padding" value="TRAILING" />

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

                   <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>
Last modified

Tags

This page has no custom tags.

Classifications

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