StartPattern Splitter transform
The StartPattern Splitter transform splits messages in the data stream according to the regular expression (regex) pattern that you define for the beginning of message line.
To use the StartPattern Splitter transform, you must know how to use
regular expressions. For more information about regular expressions, see Oracle documentation about
regular expressions: https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html.
Important:
- The use of complex regular expressions might increase the usage of system resources.
- The StartPattern Splitter transform only matches the beginning of message lines. Therefore, the specified regular expression (regex) pattern must start with ^.
- Between each data stream and each of its subscribers, only one StartPattern Splitter transform can be specified.
Configuration values that you can update
For the StartPattern Splitter transform, you can update the following
field values in the
Configure Splitter transformwindow:
- Inspect
- Specifies whether, and at what stage, data packets in the data stream are to be inspected. For
example, during transform processing, the data packets can be inspected by printing them to the
Z Common Data Provider Data Streamer job log at
the input stage, the output stage, or both stages. You can choose any of the following values. The default value is None. To prevent the sending of large volumes of data to the Z Common Data Provider Data Streamer job log, use the default value, unless you are instructed by IBM® Software Support to change this value for troubleshooting purposes.
- None
- Specifies that data packets are not inspected.
- Input
- Specifies that data packets are printed to the Data Streamer job log before they are processed by the transform.
- Output
- Specifies that data packets are printed to the Data Streamer job log after they are processed by the transform.
- Both
- Specifies that data packets are printed to the Data Streamer job log both before and after they are processed by the transform.
- Record start
- Specifies one valid regular expression starting with ^, which is used to match the beginning of a record.
Examples
The following example shows how to define a Regular Expression for the StartPattern Splitter to split data.
The sample regex expression
is:
^(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} CEST ; \[[0-9]+\] ; \[[A-Z]+[0-9]+\] ; \[[A-Z]+\] ;)
The following image shows the regex expression in the
Configure Splitter transformwindow.
The following is the example data before being processed by the sample StartPattern
Splitter transform.
...
2018-04-16 15:38:33.609 CEST ; [574] ; [AN42] ; [SEVERE] ;
This is the first sample message.
2018-04-17 15:38:33.609 CEST ; [574] ; [AN42] ; [SEVERE] ;
This is the first line of the second sample message.
This is the second line of the second sample message.
...
The following is the output of the example data after being processed by the sample
StartPattern Splitter transform.
Record 1:
...
2018-04-16 15:38:33.609 CEST ; [574] ; [AN42] ; [SEVERE] ;
This is the first sample message.
...
Record 2:
...
2018-04-17 15:38:33.609 CEST ; [574] ; [AN42] ; [SEVERE] ;
This is the first line of the second sample message.
This is the second line of the second sample message.
...