![]() |
Consumption Analytics Documentation |
The SmartFlatFileCollector is a reader that is capable of parsing data from simple flat data files (i.e., CSV or fixed-position style data files).
A flat file feed is any text file containing fixed length or delimited data records. Delimited data can be mapped into CC Record content by using both InputField
and OutputField
or by using OutputField
alone to specify the field position as the input value while setting label or labelInput
to name resources and identifiers.
Fixed length data requires that InputField
objects are defined to describe each field in terms of starting position and ending position or field length.
<batch:step id="collect_server1" next="collect_server2"> <batch:tasklet> <bean class="com.cloudcruiser.batch.CCRecordCollectTasklet"> <property name="active" value="true"/> <property name="feedName" value="server1"/> <property name="collector"> <bean class="com.cloudcruiser.batch.collect.SmartFlatFileCollector"> <property name="feedConfig" ref="feedConfig"/> <property name="strict" value="true"/> <property name="resource" value="file:${env.usageDir}/samples/server1.fixed.txt"/> </bean> </property> </bean> </batch:tasklet> </batch:step>
(c) Copyright 2017-2020 Hewlett Packard Enterprise Development LP