camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charles Moulliard <ch0...@gmail.com>
Subject Re: Route Camel : Pass variables in a SQL query
Date Tue, 09 Sep 2014 09:18:57 GMT
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 <sayed.abdulislam@gmail.com>
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message