public abstract class AbstractCsvResourceBuilder extends AbstractCsvLineResourceBuilder
AbstractCsvLineResourceBuilder
, this abstract class addthe processing of
extracting one of the column using a provided column name, and ocnstructs a dictionary.
This class passes the processing to an
IResourceTuple.addKeyValue(String, Tuple)
method for each read value.
s * @author dimi
IResourceBuilder.CompactionType
columns, csvOperator
Constructor and Description |
---|
AbstractCsvResourceBuilder(List<String> columns,
String delimiter,
boolean inferTypes,
String hashKey,
boolean lowerCase,
boolean hasHeader)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Tuple |
onEnd()
Callback that tells you the scan is done.
|
onStart, onStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
public AbstractCsvResourceBuilder(List<String> columns, String delimiter, boolean inferTypes, String hashKey, boolean lowerCase, boolean hasHeader)
columns
- the expected csv columnsdelimiter
- the csv delimiterinferTypes
- true to make the inner tuple typed.hashKey
- not null to declare the key to be used to build the hash tablelowerCase
- true if keys must be converted to loewr caseshasHeader
- true if the csv file has a header with column declaredcompact
- true to leverage compact tuplespublic Tuple onEnd()
IResourceBuilder
You should typically free any temporary storage, if any, used to build your resource.
Copyright © 2022. All rights reserved.