Splitter
All available splitters are defined in configuration file ./etc/admin/datawizard/ci_splitter.properties . Lobster_data provides a programming interface (API) that also allows you to develop your own components in Java. For this, we offer in-depth training. If you are interested, please contact our support or sales staff.
EDIFACT Message Splitter
This splitter separates EDIFACT files that contain several EDIFACT messages. A file is created from each message.
EDIFACT UNH Message Splitter
This splitter separates EDIFACT files that have several UNH segments. The envelope around the file is copied into each new file. Note that the segment counter will not be updated.
JSON Splitter
Splits large JSON files.
(1) Specifies the number of objects to be combined. If 1, a new JSON file is created per splitting text (5).
(2) Prefix that is placed in front of the splitting text.
(3) Suffix placed after the splitting text (not for the last occurrence).
(4) If true, the last comma up to and including the second to last occurrence is removed if necessary. The JSON text is normalised, i.e. all spaces and line breaks are removed, which must then also be considered in the splitting text (5).
(5) Text after which a split is performed.
Example
Given is the following file and the settings in the screenshot. The result of the splitting are the three files that are listed afterwards.
{
"users"
: [ {
"userId"
:
1
,
"firstName"
:
"Krish"
,
"lastName"
:
"Lee"
,
"phoneNumber"
:
"123456"
,
"emailAddress"
:
"krish.lee@learningcontainer.com"
}, {
"userId"
:
2
,
"firstName"
:
"racks"
,
"lastName"
:
"jacson"
,
"phoneNumber"
:
"123456"
,
"emailAddress"
:
"racks.jacson@learningcontainer.com"
}, {
"userId"
:
3
,
"firstName"
:
"denial"
,
"lastName"
:
"roast"
,
"phoneNumber"
:
"33333333"
,
"emailAddress"
:
"denial.roast@learningcontainer.com"
}
]
}
{
"users"
:[{
"userId"
:
1
,
"firstName"
:
"Krish"
,
"lastName"
:
"Lee"
,
"phoneNumber"
:
"123456"
,
"emailAddress"
:
"krish.lee@learningcontainer.com"
}]}
{
"users"
:[{
"userId"
:
2
,
"firstName"
:
"racks"
,
"lastName"
:
"jacson"
,
"phoneNumber"
:
"123456"
,
"emailAddress"
:
"racks.jacson@learningcontainer.com"
}]}
{
"users"
:[{
"userId"
:
3
,
"firstName"
:
"denial"
,
"lastName"
:
"roast"
,
"phoneNumber"
:
"33333333"
,
"emailAddress"
:
"denial.roast@learningcontainer.com"
}]}
Plain Text Splitter
This file splitter checks line-by-line whether the defined rules apply. A split file is created by a matching initial rule and a matching final rule, or even only by a single initial rule if there is no other rule defined. (this will usually be sufficient).
A new rule can be created using the context menu.
(1) There are two rule types: Is start of message, Is end of message.
(2) Possible values are
starts with
ends with
contains
equals
RegEx (regular expression)
(3) The value with which the data line is compared.
(4) If > 1, only the substring of the input data line between these indices (beginning with 1) is used in the comparison. Note: The start value has to be smaller than the end value.
Example
Assume the following file. The settings are as in the screenshot above.
ORDER;9879871234;John Doe
POS;1;7687876;1;Article1
POS;2;5477969;1;Article2
POS;3;3687652;2;Article3
END
ORDER;9527638478;Test customer 1
POS;1;6537896;1;Article4
POS;2;2971087;1;Article5
END
The following two files are created.
ORDER;9879871234;John Doe
POS;1;7687876;1;Article1
POS;2;5477969;1;Article2
POS;3;3687652;2;Article3
END
ORDER;9527638478;Test customer 1
POS;1;6537896;1;Article4
POS;2;2971087;1;Article5
END
Note: As already mentioned, in this case, only the initial rule would suffice to achieve the same result.
Tradacoms Message Splitter
If an input file contains several Tradacoms messages (so several messages with each message starting at segment STX and ending at segment END), the file will be split into several files containing only one Tradacoms message (so one message starting at segment STX and ending at segment END).
X12 Message Splitter V2
Note: The first version (V1) of the splitter is only available for compatibility reasons and is not described here. Please always use version 2.
If an input file contains several X12 messages (so several messages with each message starting at segment ISA and ending at segment IEA), the file will be split into several files containing only one X12 message (so one message starting at segment ISA and ending at segment IEA).
XML Message Splitter
This splitter separates files that contain multiple XML definitions. Example:
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
ORDER
no
=
"9879871234"
cust
=
"John Doe"
>
<
POS
index
=
"1"
no
=
"7687876"
amount
=
"1"
artName
=
"Article1"
/>
<
POS
index
=
"2"
no
=
"5477969"
amount
=
"1"
artName
=
"Article2"
/>
<
POS
index
=
"3"
no
=
"3687652"
amount
=
"2"
artName
=
"Article3"
/>
</
ORDER
>
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
ORDER
no
=
"9527638478"
cust
=
"Test customer 1"
>
<
POS
index
=
"1"
no
=
"6537896"
amount
=
"1"
artName
=
"Article4"
/>
<
POS
index
=
"2"
no
=
"2971087"
amount
=
"1"
artName
=
"Article5"
/>
</
ORDER
>
As a result, the splitter would provide the following two files.
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
ORDER
no
=
"9879871234"
cust
=
"John Doe"
>
<
POS
index
=
"1"
no
=
"7687876"
amount
=
"1"
artName
=
"Article1"
/>
<
POS
index
=
"2"
no
=
"5477969"
amount
=
"1"
artName
=
"Article2"
/>
<
POS
index
=
"3"
no
=
"3687652"
amount
=
"2"
artName
=
"Article3"
/>
</
ORDER
>
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
ORDER
no
=
"9527638478"
cust
=
"Test customer 1"
>
<
POS
index
=
"1"
no
=
"6537896"
amount
=
"1"
artName
=
"Article4"
/>
<
POS
index
=
"2"
no
=
"2971087"
amount
=
"1"
artName
=
"Article5"
/>
</
ORDER
>
XML Node Splitter
This splitter expects the specification of a root node (1) and a split node (2). Both must be specified with an XPath expression.
The root node is the 'top' node of the XML document. The split node is the node that is found multiple times in the document and is to be split. The result is as many files as there are split nodes and each result file is the complete XML document with but only one split node in each result file. Example:
For example, consider the following file. As XPath expressions, we use /breakfast in field Root Node and /breakfast/food in field Split Node.
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<
breakfast
>
<
food
>
<
name
>Belgian Waffles</
name
>
<
price
>$5.95</
price
>
<
description
>Two of our famous Belgian Waffles with plenty of real maple syrup</
description
>
</
food
>
<
food
>
<
name
>French Toast</
name
>
<
price
>$4.50</
price
>
<
description
>Thick slices made from our homemade sourdough bread</
description
>
</
food
>
</
breakfast
>
As a result, we get these two files.
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
breakfast
>
<
food
>
<
name
>Belgian Waffles</
name
>
<
price
>$5.95</
price
>
<
description
>Two of our famous Belgian Waffles with plenty of real maple syrup</
description
>
</
food
>
</
breakfast
>
<?
xml
version
=
"1.0"
encoding
=
"ISO-8859-1"
?>
<
breakfast
>
<
food
>
<
name
>French Toast</
name
>
<
price
>$4.50</
price
>
<
description
>Thick slices made from our homemade sourdough bread</
description
>
</
food
>
</
breakfast
>