The Splitter processes income messages containing multiple elements that might have to be processed in different ways. The Splitter emits out the composite message into individual messages, each containing data related to one item.
Component does not have any required environment variables, but we suggest to use EIO_REQUIRED_RAM_MB
in order to avoid Component run out of memory and terminated
error, recommended value of allocated memory is 512
MB.
Please Note: From the platform version 20.51 we deprecated the component
LOG_LEVEL
environment variable. Now you can control logging level per each step of the flow.
The technical notes page gives some technical details about Splitter component like changelog.
This component has no trigger functions. This means it will not be accessible to select as a first component during the integration flow design.
This action is deprecated, please use Split on JSONata Expression instead.
Splits a message into multiple messages using a given separator. The separator is treated as a path to a property inside the message. A message is split when a property is an array and emitted are multiple messages. Otherwise the original message is emitted.
For example, we have a message:
{
"users": [
{
"name": "John"
},
{
"name": "Mike"
}
]
}
The splitting expression is “users”, action will return output:
{
"name": "John"
}
{
"name": "Mike"
}
Notes:
- When splitting expression refers to an object splitter returns this object;
- When splitting expression contains primitive value like
users:"John"
or array of primitives likeusers:["John", "Mike", "Anna"]
splitter emits error.
This component takes the incoming message body and applies the configured JSONata tranformation on it. The evaluated transformation must be an array. This array is split and emitted into multiple messages.
For example, given the following message:
{
"FirstName": "Fred",
"Surname": "Smith",
"Phone": [
{
"type": "home",
"number": "0203 544 1234"
},
{
"type": "office",
"number": "01962 001234"
},
{
"type": "mobile",
"number": "077 7700 1234"
}
]
}
and the JSONata expression Phone.{type: number}
, an object constructor, the
action will return output:
Please note: If the evaluated array contains primitive values like
users:["John", "Mike", "Anna"]
, the splitter emits error.
Split Property
- use this field to choose a separator.
Inverse of the split action: Given a stream of incoming messages that which have been split apart by a split action (or similar), produce one message once all message parts have arrived:
groupSize
- Number of messages in the group
groupId
- Globally unique id for the group to distinguish it from other groups. This value needs to be the same for all messages in a group.
messageId
- Id for a message to distinguish it from other messages in the group.
Must be unique per group but does not have to be globally unique. This value needs to be different for all messages in a group.
Get your free 14-day elastic.io trial account to use this component.