EdifactSegmentSplitter

Configuration file

./conf/samples/sample_edifact_segment_splitter.properties

Class name

com.ebd.hub.datawizard.parser.EdifactSegmentSplitter

Description


This preparser is able to divide a large EDIFACT message into several messages.

The result is not multiple jobs. Only one job is created and one record is generated for each split message.

Each split message is like the original big EDIFACT message, but it only contains a number of package split segments. See example below.

Note: With the parameter package=1, you can parse an EDIFACT message so that a record is created per LIN segment if the task is to generate one output file per LIN. See example below. See also section Execute Responses per Record.


The parameters for the needed properties file are the following.


segment

(mandatory) Segment name, e.g. LIN

package

(mandatory) Package size, e.g. 5000

The parameter segment specifies the segment in the EDIFACT file, that is to be used for the splitting process and package defines the maximum number of segments, contained in a single split message. In this case: 5000 LIN segments per EDIFACT file created by the splitting.

Example file


We use the following configuration file.


sample_edifact_segment_splitter.properties
#Properties for com.ebd.hub.datawizard.parser.EdifactSegmentSplitter
#Define the segment to split with
segment=LIN
#
#Define the max. package size - e.g. put 1 LIN segment into one message
package=1

Following the original EDIFACT file.


UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
UNH+00000000000117+INVOIC:D:97B:UN'
BGM+380+342459+9'
DTM+3:20060515:102'
RFF+ON:521052'
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
CUX+1:USD'
 
LIN+1++157870:IN'
IMD+F++:::WIDGET'
QTY+47:1020:EA'
ALI+US'
MOA+203:1202.58'
PRI+INV:1.179'
 
LIN+2++157871:IN'
IMD+F++:::DIFFERENT WIDGET'
QTY+47:20:EA'
ALI+JP'
MOA+203:410'
PRI+INV:20.5'
 
UNS+S'
MOA+39:2137.58'
ALC+C+ABG'
MOA+8:525'
UNT+23+00000000000117'
UNZ+1+00000000000778'

The result is one job with two records that are filled with the following data.

UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
UNH+00000000000117+INVOIC:D:97B:UN'
BGM+380+342459+9'
DTM+3:20060515:102'
RFF+ON:521052'
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
CUX+1:USD'
 
LIN+1++157870:IN'
IMD+F++:::WIDGET'
QTY+47:1020:EA'
ALI+US'
MOA+203:1202.58'
PRI+INV:1.179'
 
UNS+S'
MOA+39:2137.58'
ALC+C+ABG'
MOA+8:525'
UNT+23+00000000000117'
UNZ+1+00000000000778'
UNB+UNOA:1+005435656:1+006415160:1+060515:1434+00000000000778'
UNH+00000000000117+INVOIC:D:97B:UN'
BGM+380+342459+9'
DTM+3:20060515:102'
RFF+ON:521052'
NAD+BY+792820524::16++CUMMINS MID-RANGE ENGINE PLANT'
NAD+SE+005435656::16++GENERAL WIDGET COMPANY'
CUX+1:USD'
 
LIN+2++157871:IN'
IMD+F++:::DIFFERENT WIDGET'
QTY+47:20:EA'
ALI+JP'
MOA+203:410'
PRI+INV:20.5'
 
UNS+S'
MOA+39:2137.58'
ALC+C+ABG'
MOA+8:525'
UNT+23+00000000000117'
UNZ+1+00000000000778'