I am working with Talend ESB which uses camel. My requirement is I need to do batch insert into a table, and have to create the query dynamically for different types of input.
If I create a context say extVar and default it to "insert into table_foo (foo, bar) values (:#foo, :#bar)" and then use cMessagingEndpoint component with following code "sql"+context.extVar+"?batch=true&dataSource=mysql" it works fine.
In Talend, I am able to access context.extVar inside cProcessor so I tried to load the query dynamically from there, but I couldn't.
Since I am using named parameters, I assume that I can neither use the body for query nor can I get the property/header value inside the sql statement of cMessageEndPoint.
Is there way where I can populate the query dynamically into sql statement of cMessageEndPoint.
