InsertRecordMarkerPreParser

Configuration file

./conf/samples/sample_InsertRecordMarker.properties

Class name

com.ebd.hub.datawizard.parser.stream.InsertRecordMarkerPreParser

Description


Uses regular expressions to insert lines (new record marker) into the input data, which can be used for the decision (in the source tree) whether a new record has to be created. Two modes are available. Either the matching of the regular expression with the current line or a changed value in groups of the regular expression decide whether a record marker is inserted. The following parameters are available.


readtype

(optional) (line or number of characters) If line, each line of the input file is checked, otherwise the line specified by the number of characters. Default: line

matchline

Regular expression to check against.

caseinsensitive

(optional) If true, the check will not be case-sensitive. Default: false

recordMarker

(optional) String that is used for marking a new record in the input data. Default: NEWRECORD

newRecordOnMatch

If true, the matching of the regular expression with the current line is used as the criterion for a new record marker. If false, a changed value in groups of the regular expression is the criterion.

newRecordOnOneValChange

(optional) If true, only one value has to change. If false, all values have to change. Default: true

recmarkerReplacement

(optional) If true, a replacement of the marker is executed before the insert. Default: false

Example


InsertRecordMarker.properties
#
# Example configuration for the preparser InsertRecordMarkerPreParser
#
# Type of data read operation. Valid values: line or the number of characters
# readtype = line
# The regular expression for the decision of the creation of a new record marker
matchline = ^.{24}(\\d{6}).*$


The example above contains a transaction number with 6 digits at position 24. If it changes, a record marker is inserted.