The header to be used to log the query is named 'CamelSqlQuery'. See the doc here : http://camel.apache.org/sql-component.html`
<to uri="sql:SELECT * from company where id = :#id"/> <log message="Query : $header. CamelSqlQuery}" /> On Mon, Sep 8, 2014 at 8:19 PM, sayed_india <[email protected]> wrote: > Hello, > > I tried the below code and able to print the id, but not able to get the > required query. > > Please correct the code: > > <when> > <simple>${header.operationName} == 'getCompany'</simple> > <setHeader headerName='id'> > <simple>$simple{body}</simple> > </setHeader> > <log id="log1" message ="param name---:${in.header.id}" /> > <to uri="sql:SELECT * from company where id = :#id"/> > </when> > > Thanks, > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Route-Camel-Pass-variables-in-a-SQL-query-tp477181p5756205.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Charles Moulliard Apache Committer / Architect @RedHat Twitter : @cmoulliard | Blog : http://cmoulliard.github.io
