Class CsvProcessor.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder<CsvProcessor.Builder>
co.elastic.clients.elasticsearch.ingest.CsvProcessor.Builder
- All Implemented Interfaces:
WithJson<CsvProcessor.Builder>
,ObjectBuilder<CsvProcessor>
- Enclosing class:
- CsvProcessor
public static class CsvProcessor.Builder
extends ProcessorBase.AbstractBuilder<CsvProcessor.Builder>
implements ObjectBuilder<CsvProcessor>
Builder for
CsvProcessor
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aCsvProcessor
.final CsvProcessor.Builder
emptyValue
(JsonData value) Value used to fill empty fields.final CsvProcessor.Builder
Required - The field to extract data from.final CsvProcessor.Builder
ignoreMissing
(Boolean value) Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.final CsvProcessor.Builder
Quote used in CSV, has to be single character string.protected CsvProcessor.Builder
self()
final CsvProcessor.Builder
Separator used in CSV, has to be single character string.final CsvProcessor.Builder
targetFields
(String value, String... values) Required - The array of fields to assign extracted values to.final CsvProcessor.Builder
targetFields
(List<String> list) Required - The array of fields to assign extracted values to.final CsvProcessor.Builder
Trim whitespaces in unquoted fields.Methods inherited from class co.elastic.clients.elasticsearch.ingest.ProcessorBase.AbstractBuilder
description, if_, ignoreFailure, onFailure, onFailure, onFailure, tag
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
emptyValue
Value used to fill empty fields. Empty fields are skipped if this is not provided. An empty field is one with no value (2 consecutive separators) or empty quotes (""
).API name:
empty_value
-
field
Required - The field to extract data from.API name:
field
-
ignoreMissing
Iftrue
andfield
does not exist, the processor quietly exits without modifying the document.API name:
ignore_missing
-
quote
Quote used in CSV, has to be single character string.API name:
quote
-
separator
Separator used in CSV, has to be single character string.API name:
separator
-
targetFields
Required - The array of fields to assign extracted values to.API name:
target_fields
Adds all elements of
list
totargetFields
. -
targetFields
Required - The array of fields to assign extracted values to.API name:
target_fields
Adds one or more values to
targetFields
. -
trim
Trim whitespaces in unquoted fields.API name:
trim
-
self
- Specified by:
self
in classProcessorBase.AbstractBuilder<CsvProcessor.Builder>
-
build
Builds aCsvProcessor
.- Specified by:
build
in interfaceObjectBuilder<CsvProcessor>
- Throws:
NullPointerException
- if some of the required fields are null.
-