Class SelectFields
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SelectFields
- Direct Known Subclasses:
IncludeFields
Select and arrange fields according to the supplied field names -- like an SQL SELECT statement.
See
FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionSelectFields(String... fieldNames) SelectFields(Collection<String> fieldNames) -
Method Summary
Modifier and TypeMethodDescriptionAppends fields to select, placed after those already added.add(Collection<String> fieldNames) Appends fields to select, placed after those already added; a null collection is ignored.booleanIndicates if fields missing from a record are skipped instead of causing an exception (default is false).setLenient(boolean lenient) Indicates if fields missing from a record are skipped instead of causing an exception (default is false).toString()booleanApplies this transformer to a record on its way through aTransformingReaderorTransformingWriter.Methods inherited from class com.northconcepts.datapipeline.transform.Transformer
addExceptionProperties, close, geEndpoint, getEndpoint, getReader, getWriter, of, open, setWriter
-
Constructor Details
-
SelectFields
-
SelectFields
-
-
Method Details
-
isLenient
public boolean isLenient()Indicates if fields missing from a record are skipped instead of causing an exception (default is false). -
setLenient
Indicates if fields missing from a record are skipped instead of causing an exception (default is false). -
getFields
-
add
Appends fields to select, placed after those already added; a null collection is ignored. -
add
Appends fields to select, placed after those already added. -
transform
Description copied from class:TransformerApplies this transformer to a record on its way through aTransformingReaderorTransformingWriter.Contract for subclasses (see also
docs/authoring/Transformer.md):- Mutate
recordin place as needed. - Return
trueto keep the record in the pipeline. - Return
falseto drop the record (the host routes it to a discard writer if one is configured, otherwise it disappears). - Throw to fail (or route to a discard writer, depending on host configuration).
- Do not call
incrementRecordCount()on the host endpoint; the host handles it.
- Specified by:
transformin classTransformer- Throws:
Throwable
- Mutate
-
toString
-