Best way to include SQL scripts in job

Four Stars

Best way to include SQL scripts in job

Hi,

at the moment I have the problem that I'd like to include 60+ SQL script files in my talend job. So my question is: what would be the best practice to accomplish this task since the commandline has been flagged as depricated and there's no possibility to include SQL files as resources I can iterate over (like in a simple jar). I'm now thinking of a solution where I'm providing these files as external jar in order to be able to load them from the classpath. What do you think of this approach. Are there any other solutions I haven't thought about yet (I don't want to store each script within a tSQLCommand)?

Best regards

Sixteen Stars

Re: Best way to include SQL scripts in job

You could store your SQL scripts as Varchars in a database. That wouldn't be difficult to achieve. Since the DB components which use SQL actually make use of Java Strings, you can easily make use of values retrieved from a database to use in or as queries.