public class CsvToArrayResourceBuilder extends AbstractCsvLineResourceBuilder
This builder always return a new array, it does not support an in place update strategy.
This is a rare case as most CSV resource files are used to be transformed as a dictionary tuple. Check out the CSV dictionary builder.
IResourceBuilder.CompactionType
columns, csvOperator
Constructor and Description |
---|
CsvToArrayResourceBuilder(List<String> columns,
String delimiter,
boolean inferTypes,
boolean lowerCase,
boolean hasHeader)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
Tuple |
onEnd()
Callback that tells you the scan is done.
|
void |
onStart()
Callback to tell you you are about to receive new lines.
|
onStream
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepare
public CsvToArrayResourceBuilder(List<String> columns, String delimiter, boolean inferTypes, 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 void onStart()
IResourceBuilder
onStart
in interface IResourceBuilder
onStart
in class AbstractCsvLineResourceBuilder
public Tuple onEnd()
IResourceBuilder
You should typically free any temporary storage, if any, used to build your resource.
Copyright © 2022. All rights reserved.