Splitting a Collection, Iterator or Array - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

A common use case is to split a Collection, Iterator or Array from the message. In the sample below we simply use an Expression to identify the value to split.

from("direct:splitUsingBody").split(body()).to("mock:result");
 
from("direct:splitUsingHeader").split(header("foo")).to("mock:result"); 

In Spring XML you can use the Simple language to identify the value to split.

<split>
   <simple>${body}</simple>
   <to uri="mock:result"/>
</split>
 
<split>
   <simple>${header.foo}</simple>
   <to uri="mock:result"/>
</split>