To use SQL in your camel routes you need to add the a dependency on camel-josql which implements the SQL language.
If you use maven you could just add the following to your pom.xml, substituting the version number for the latest & greatest release (see the download page for the latest versions).
Camel supports SQL to allow an Expression or Predicate to be used in the DSL or Xml Configuration. For example you could use SQL to create an Predicate in a Message Filter or as an Expression for a Recipient List.
And the spring DSL:
the Exchange object
the exchange.in message
the exchange.out message
the property key
the Exchange properties
the header key
the exchange.in headers
the variable key
if any additional variables is added using
Loading script from external resource
Available as of Camel 2.11
You can externalize the script and have Camel load it from a resource such as
This is done using the following syntax:
"resource:scheme:location", eg to refer to a file on the classpath you can do: