Class SplitWords
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SplitWords
Flattens an array field by creating one record for each value.
See
FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionSplitWords(String sourceFieldPath, String targetFieldPath) Creates a transformer that stores the words of the source field's text as a string array in the target field, finding words with the default locale's rules.SplitWords(String sourceFieldPath, String targetFieldPath, Locale locale) Creates a transformer that stores the words of the source field's text as a string array in the target field, finding words with the given locale's rules (the default locale if null). -
Method Summary
Modifier and TypeMethodDescriptionReturns the words (matched case-sensitively) left out of the result or null if none are excluded.setExcludedWords(Set<String> excludedWords) Sets the words (matched case-sensitively) to leave out of the result; null excludes none.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
-
SplitWords
Creates a transformer that stores the words of the source field's text as a string array in the target field, finding words with the given locale's rules (the default locale if null). -
SplitWords
Creates a transformer that stores the words of the source field's text as a string array in the target field, finding words with the default locale's rules.
-
-
Method Details
-
getExcludedWords
Returns the words (matched case-sensitively) left out of the result or null if none are excluded. -
setExcludedWords
Sets the words (matched case-sensitively) to leave out of the result; null excludes none. -
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
-