You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by darwinanirudh <da...@gmail.com> on 2017/05/16 12:39:03 UTC

Camel sql Component should retrieve data when the particular column is null using select query

Dear Team ,

Route one :

<from uri="sql:{{sql.RecycleHBRSelectQuery}}?"/>

sql.RecycleHBRSelectQuery=select CDR_JSON from  suspense_details where
CDR_JSON is null

Route two :

<from uri="sql:{{sql.RecycleHBRSelectQuery}}?"/>

sql.RecycleHBRSelectQuery=select CDR_JSON from  suspense_details where
CDR_JSON is not null

I have scenario like the following field CDR_JSON is null i have perform one
set of operations and if it is not null then i would have to perform another
set of operations.

I want to know if there is any other i can implement this in a single route.

regards
Darwin







--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sql Component should retrieve data when the particular column is null using select query

Posted by raja <ra...@meru.co.in>.
Change from:
  <simple>${body[CDR_JSON_FORM]}!= null </simple>

Change TO:
  <simple>${body[CDR_JSON_FORM]} != null </simple>



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613p5799771.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sql Component should retrieve data when the particular column is null using select query

Posted by darwinanirudh <da...@gmail.com>.
Thank you for response.

regards
Darwin



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613p5800760.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel sql Component should retrieve data when the particular column is null using select query

Posted by darwinanirudh <da...@gmail.com>.
<choice>
			<when>
			<simple>${body[CDR_JSON_FORM]}!=  </simple>
			<log message="body field is not null" />
			</when>
			<otherwise>
			<log message="body field is null" />
			</otherwise>
			</choice>

Caused by:
org.apache.camel.language.simple.types.SimpleIllegalSyntaxException:
expected symbol whiteSpace but was nullValue at location 19
${bodyAs(String)}!=null

Can any one help 




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613p5799769.html
Sent from the Camel - Users mailing list archive at Nabble.com.