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 > Setting up the feed configuration > Input and output fields

Input and output fields

Input and output fields are for most collectors. Collectors not only read data from external sources, but also convert data from external formats to Cloud Cruiser’s native format. The input and output fields are commonly employed as part of a collector’s feed configuration to control conversion from an external format to Cloud Cruiser’s native CC Record format.

InputFields

Records read in by collectors are initially stored in a set of inputFields . Part of a collector’s configuration is to describe the various columns in the input data. A single inputField corresponds to a single column of usage data. Once loaded, this data will be manipulated, referenced, and mapped into outputFields which will be written into an output CC Record file at the end of the step for processing by subsequent job steps.

Inputs are described by a list of inputField beans that are contained between <list> and </list> tags. XML property tags are used to describe each inputField bean in the list.

Example

The following example shows how inputFields are implemented in XML.

<bean id="nameOfFeedConfigBean" class="com.cloudcruiser.batch.collect.desiredCollectorFeedConfig">
  <property name="inputs">
    <list>
      <!‐‐ Describe the first input field ‐‐>
      <bean class="com.cloudcruiser.batch.collect.InputField">
        <property name="...">
        <property name="...">
        ...
      </bean>
      <!‐‐ Describe the second input field ‐‐>
      <bean class="com.cloudcruiser.batch.collect.InputField">
        <property name="...">
        <property name="...">
        ...
      </bean>
      <!‐‐ Describe subsequent input fields ‐‐>
      ...
    </list>
  </property>
  ... (other properties)
</bean>

InputField properties

<property name="name" value="inputFieldUniqueName" />
Defines the name assigned to the inputField. This is required.

<property name="pos" value="inputFieldPosition" />
Defines the field number, which is required for mapping input from delimited files, JDBC, and spreadsheets.

<property name="start" value="inputFieldStart" />
Defines the field start position (character offset from the first character), which is required for fixed length record formats.

<property name="end" value="inputFieldEnd" />
Defines the field end position, required for fixed length record formats if the len property is not present.

<property name="len" value="inputFieldLen" />
Defines the field end position, required for fixed length record formats if the end property is not present.

<property name="regularExpression" value="inputFieldRegExp" />
Optional property that allows the script to perform a regular expression operation on the inputField before parsing. This can be useful in situations where the inputField must reflect a sub-string of the actual input, and not the total input. When set, the pattern is always applied to the entire input identifier and the resulting match is used instead of the literal portion for assembling output.

Sub-string settings are applied to the match result and not the original input. The pattern can contain a set of parenthesis delineating a sub-match for extraction. A no match condition is now treated the same as a missing identifier. It is an unexpected processing exception controlled by the transform tasklet exception processing properties.

OutputFields

OutputFields correspond to columns of data found in the CC Record output. As with inputs, outputs are described by list of outputField beans that are contained between <list> and </list> tags. XML property tags are used to describe each outputField bean in the list.

Example

The following example shows how outputFields are implemented in XML.

<bean id="nameOfFeedConfigBean" class="com.cloudcruiser.batch.collect.desiredCollectorFeedConfig">
  <property name="outputs">
    <list>
      <!‐‐ Describe the first output field ‐‐>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="...">
        <property name="...">
        ...
      </bean>
      <!‐‐ Describe the second output field ‐‐>
      <bean class="com.cloudcruiser.batch.collect.OutputField">
        <property name="...">
        <property name="...">
        ...
      </bean>
      <!‐‐ Describe subsequent output fields ‐‐>
      ...
    </list>
  </property>
  ... (other properties)
</bean>

OutputField properties

<property name="cctype" value="outputFieldType" />
Sets the outputField type. This defines the nature of the data being mapped into the outputField. The outputField list is mandatory.
For more information, see the next section in this article.
<property name="input" value="inputFieldToMap" />
Defines the name of the inputField that is mapped to this outputField. This field is required unless a literal value is provided.
The expected content may vary based on which collector is being used.
<property name="label" value="outputFieldLabel" />
Defines the name of the identifier or resource. A label is required if cctype is identifier or resource and a literal value is provided. By default, the label field will be set to the name of the inputField.
<property name="labelInput" value="outputFieldLabelInput" />
(Optional) Defines the inputField that contains the name of this identifier or resource.
<property name="value" value="outputFieldValue" />
The literal value for the outputField.
If the cctype is usage, this value must match the date/time format defined in the feed configuration (feedConfig).

OutputField types

outputFieldType can be one of the following:

IDENTIFIER

Identifier value. This is any piece of data found in the record that is not a usage date or resource. An important use for identifiers is to correlate the resource(s) being consumed with the user that is consuming it. Identifiers not used to correlate the record to an account may still be stored in the database and reported on.

RESOURCE

Resource value. A resource corresponds to a billable resource. The inputField mapped to a resource outputField would contain the quantity of the resource being consumed.

USAGE_DATE

Start and end date, with 24 hours of usage

USAGE_START

Start date and time

USAGE_END

End date and time

Last modified

Tags

This page has no custom tags.

Classifications

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