I am trying to do is select all rows from DB, and for each row update some column for that row. Below is my camel route.
from("direct:insert").
from("sql:select * from my_table").
split(body()).
log("${body[id]}").
end();
I use the below code to start this route...
context.createProducerTemplate().sendBody("direct:insert", null);
Problem is it happens multiple times (i.e. all the id's from my_table are printed around 18 times!!). How do i make it happen just once?
Below code worked fine for me..
from("direct:insert").
to("sql:select * from my_table").
split(body()).
log("${body[id]}").
end();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With