Class SetUuidField
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SetUuidField
Adds a field with a randomly generated UUID as its value.
-
Constructor Summary
ConstructorsConstructorDescriptionSetUuidField(String name) Creates a transformer that sets the field to a new random UUID string, overwriting any existing value.SetUuidField(String name, boolean overwrite) Creates a transformer that sets the field to a new random UUID string unless it exists andoverwriteis false. -
Method Summary
Methods inherited from class com.northconcepts.datapipeline.transform.Transformer
addExceptionProperties, close, geEndpoint, getEndpoint, getReader, getWriter, of, open, setWriter
-
Constructor Details
-
SetUuidField
Creates a transformer that sets the field to a new random UUID string, overwriting any existing value. -
SetUuidField
Creates a transformer that sets the field to a new random UUID string unless it exists andoverwriteis false.
-
-
Method Details
-
getName
-
getOverwrite
public boolean getOverwrite() -
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
-