Input and output fields

Table of contents

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.

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.

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.