Class SetGroupSequenceNumberField
java.lang.Object
com.northconcepts.datapipeline.transform.Transformer
com.northconcepts.datapipeline.transform.SetGroupSequenceNumberField
Adds a sequence (auto increment) field that is incremented with the step value as long as the value(s) in the specified
watch fields remain the same as the previous record. The sequence is reset to the start value when watch fields
differ 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
ConstructorsConstructorDescriptionSetGroupSequenceNumberField(String name, double start, double step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetGroupSequenceNumberField(String name, double start, double step, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value.SetGroupSequenceNumberField(String name, long start, long step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetGroupSequenceNumberField(String name, long start, long step, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value.SetGroupSequenceNumberField(String name, BigDecimal start, BigDecimal step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetGroupSequenceNumberField(String name, BigDecimal start, BigDecimal step, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value.SetGroupSequenceNumberField(String name, BigInteger start, BigInteger step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value.SetGroupSequenceNumberField(String name, BigInteger start, BigInteger step, String... watchFields) Creates a transformer that numbers the records of each group 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
-
SetGroupSequenceNumberField
Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value. -
SetGroupSequenceNumberField
Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, BigDecimal start, BigDecimal step, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, BigInteger start, BigInteger step, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep, overwriting any existing value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, long start, long step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, double start, double step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, BigDecimal start, BigDecimal step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group fromstartin steps ofstep; whenoverwriteis false, records that already have the field keep their value. -
SetGroupSequenceNumberField
public SetGroupSequenceNumberField(String name, BigInteger start, BigInteger step, boolean overwrite, String... watchFields) Creates a transformer that numbers the records of each group 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
-