I know you can use a tContext Component in a job or the implicit tContextLoad functionality to load context variables from a file.
I was wondering how you would do the equivalent inside a talend route?
This is MUCH harder inside routes. You need to use Property Placeholders. There is no easy way to do this other than spending a while trying it out. Take a look here: http://edwardost.github.io/cloud/platform/soa/2015/05/14/Working-with-Property-Placeholders-in-Talen...
That tutorial is what got me going with these. Once you get the hang of it, it is really powerful.
thanks for that - very useful
I'm a java developer versed in Spring so this makes more sense that context loading.
I'm assuming I can use the same project level property file for context loading and property placeholder for jobs and routes within one project...
Would be interesting to see what Talend's official line is too....I couldn't find anything in help.talend.com...maybe they defer to spring/camel set up...
Talend ESB is essentially just a wrapper around Apache Camel. You can configure most of what you will need to configure within the Studio, but it might make sense to configure either a Blueprint or Spring file with DB connection pooling ,etc, and deploy that manually inside the Karaf. You may/may not have seen this, but you can make use of Spring within the Studio. There will be a Spring file for each of your Routes. Sometimes this is hidden, but it is definitely there.
I tend to spend most of my time looking at Camel documentation when I am working with Routes within Talend. The big benefit of Talend is that you can create Talend jobs and use them with Routes. Other than that, you are essentially working with Camel.
Thanks for that.
Looks like you can run routes as spring boot apps too!
Will experiment...hoping to leverage spring boot's use of convention over configuration, with application.properties and application-[profile].properties, to load props for routes. And then use these property files for loading up contexts in jobs using a bespoke tContextLoad job(let)
Cheers for your advise.
I have gone through your conversation and the link. We do have a requirement to pass parameters to a rout through a external file or source.
Couldn't understand in detail the procedure to pass the parameters using property place holders. Do you have any other video or blog with steps in detail?