Quantcast

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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

darwinanirudh
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



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

darwinanirudh
This post was updated on .
<choice>
                        <when>
                        <simple>${body[CDR_JSON_FORM]}!= null </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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

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

Change TO:
  <simple>${body[CDR_JSON_FORM]} != null </simple>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

darwinanirudh
In reply to this post by darwinanirudh
Thank you for response.

regards
Darwin
Loading...