![]() |
Consumption Analytics Documentation |
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.
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.
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>
<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
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.
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>
<property name="cctype" value="outputFieldType" />
outputField
type. This defines the nature of the data being mapped into the outputField
. The outputField
list is mandatory.inputField
that is mapped to this outputField
. This field is required unless a literal value is provided.<property name="label" value="outputFieldLabel" />
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" />
inputField
that contains the name of this identifier or resource.<property name="value" value="outputFieldValue" />
outputField
.cctype
is usage
, this value must match the date/time format defined in the feed configuration (feedConfig
).outputFieldType
can be one of the following:
| 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 value. A resource corresponds to a billable resource. The inputField mapped to a resource outputField would contain the quantity of the resource being consumed. |
| Start and end date, with 24 hours of usage |
| Start date and time |
| End date and time |
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP