Mule Tip: Including formatted SQL statements from external files in your application

November 18 2011


When developing a Mule Application the normal way to define an SQL statement is by declaring it directly in the connector, as shown in the following snippet.

However is possible that you’ll face a situation in which you have to use large and complex queries. For that scenario the previous approach is not adequate since you’ll end up with a configuration difficult to read. So the best thing to do is to externalize these queries in one or more files.