Class SetBatchSequenceNumberField
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SetBatchSequenceNumberField
Adds a sequence (auto increment) field that is incremented with the step value when the value(s) in the specified
watch fields differs from the previous record. If no watch fields are specified, the entire record is watched for change.
See
FieldPath for supported field name expressions.-
Constructor Summary
ConstructorsConstructorDescriptionSetBatchSequenceNumberField(String name, double start, double step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetBatchSequenceNumberField(String name, double start, double step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value.SetBatchSequenceNumberField(String name, long start, long step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetBatchSequenceNumberField(String name, long start, long step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value.SetBatchSequenceNumberField(String name, BigDecimal start, BigDecimal step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetBatchSequenceNumberField(String name, BigDecimal start, BigDecimal step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value.SetBatchSequenceNumberField(String name, BigInteger start, BigInteger step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetBatchSequenceNumberField(String name, BigInteger start, BigInteger step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value. -
Method Summary
Methods inherited from class com.northconcepts.datapipeline.transform.Transformer
addExceptionProperties, close, geEndpoint, getEndpoint, getReader, getWriter, of, open, setWriter
-
Constructor Details
-
SetBatchSequenceNumberField
Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value. -
SetBatchSequenceNumberField
Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, BigDecimal start, BigDecimal step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, BigInteger start, BigInteger step, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep, overwriting any existing value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, long start, long step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, double start, double step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, BigDecimal start, BigDecimal step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetBatchSequenceNumberField
public SetBatchSequenceNumberField(String name, BigInteger start, BigInteger step, boolean overwrite, String... watchFields) Creates a transformer that numbers batches fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.
-
-
Method Details
-
getName
-
getStart
-
getStep
-
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
-