Class SetCalculatedField
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SetCalculatedField
See
FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionSetCalculatedField(FieldPath name, String expression) Creates a transformer that sets the field to the value ofexpressionfor each record, overwriting any existing value.SetCalculatedField(FieldPath name, String expression, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionfor each record unless the field exists andoverwriteis false.SetCalculatedField(FieldPath name, String expression, FieldDeclarations fieldDeclarations) Creates a transformer that sets the field to the value ofexpression, overwriting any existing value;fieldDeclarationssets the Java types the expression assumes for the declared fields.SetCalculatedField(FieldPath name, String expression, FieldDeclarations fieldDeclarations, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionunless the field exists andoverwriteis false;fieldDeclarationssets the Java types the expression assumes for the declared fields.SetCalculatedField(String name, String expression) Creates a transformer that sets the field to the value ofexpressionfor each record, overwriting any existing value.SetCalculatedField(String name, String expression, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionfor each record unless the field exists andoverwriteis false.SetCalculatedField(String name, String expression, FieldDeclarations fieldDeclarations) Creates a transformer that sets the field to the value ofexpression, overwriting any existing value;fieldDeclarationssets the Java types the expression assumes for the declared fields.SetCalculatedField(String name, String expression, FieldDeclarations fieldDeclarations, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionunless the field exists andoverwriteis false;fieldDeclarationssets the Java types the expression assumes for the declared fields. -
Method Summary
Methods inherited from class com.northconcepts.datapipeline.transform.Transformer
addExceptionProperties, close, geEndpoint, getEndpoint, getReader, getWriter, of, open, setWriter
-
Constructor Details
-
SetCalculatedField
Creates a transformer that sets the field to the value ofexpressionfor each record unless the field exists andoverwriteis false. -
SetCalculatedField
Creates a transformer that sets the field to the value ofexpressionfor each record unless the field exists andoverwriteis false. -
SetCalculatedField
public SetCalculatedField(String name, String expression, FieldDeclarations fieldDeclarations, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionunless the field exists andoverwriteis false;fieldDeclarationssets the Java types the expression assumes for the declared fields. -
SetCalculatedField
public SetCalculatedField(FieldPath name, String expression, FieldDeclarations fieldDeclarations, boolean overwrite) Creates a transformer that sets the field to the value ofexpressionunless the field exists andoverwriteis false;fieldDeclarationssets the Java types the expression assumes for the declared fields. -
SetCalculatedField
Creates a transformer that sets the field to the value ofexpressionfor each record, overwriting any existing value. -
SetCalculatedField
Creates a transformer that sets the field to the value ofexpressionfor each record, overwriting any existing value. -
SetCalculatedField
Creates a transformer that sets the field to the value ofexpression, overwriting any existing value;fieldDeclarationssets the Java types the expression assumes for the declared fields. -
SetCalculatedField
Creates a transformer that sets the field to the value ofexpression, overwriting any existing value;fieldDeclarationssets the Java types the expression assumes for the declared fields.
-
-
Method Details
-
getName
-
getExpression
-
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
-