You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by raja <ra...@meru.co.in> on 2017/06/02 08:51:05 UTC

Camel jdbc - select batch processing

Hi all,
    How to select batch of records from resulting List in jdbc.
    ex: If select returns List of 1000 rows, I want to split and process 200
records per batch.Splitter is not working, its split single row. How to use
like tokenize with group in splitter in this case.



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel jdbc - select batch processing

Posted by raja <ra...@meru.co.in>.
Simple solution is* Splitter with Collate*

<from JDBC Select/>
<split>
    <simple>collate(200)</simple>
    
   <to Process or Bean or any route/>
</splitter>





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682p5801832.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel jdbc - select batch processing

Posted by Quinn Stevenson <qu...@pronoia-solutions.com>.
I believe you’d need to split using a bean to accomplish what you’re after.

Another method would be to split into single rows and then use the aggregator to create the batches of 200 rows each.

> On Jun 2, 2017, at 2:51 AM, raja <ra...@meru.co.in> wrote:
> 
> Hi all,
>    How to select batch of records from resulting List in jdbc.
>    ex: If select returns List of 1000 rows, I want to split and process 200
> records per batch.Splitter is not working, its split single row. How to use
> like tokenize with group in splitter in this case.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-jdbc-select-batch-processing-tp5801682.html
> Sent from the Camel - Users mailing list archive at Nabble.com.