Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
n999
Contributor II
Contributor II

tcontextLoad in routes

Hi

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?

Cheers

n999

Labels (3)
12 Replies
n999
Contributor II
Contributor II
Author

Input from talend:

 

Some components like the cMQConnectionFactory will throw an error with simple {{}} expressions.

You need to use the following instead.

 

camelContext.resolvePropertyPlaceholders("{{propertyName}}")
Anonymous
Not applicable

Ah I see. I've not actually tried this but I suspect that this is because the cMQConnectionFactory is initiated before the routes are started. A Talend Route is actually a Camel Context. The endpoints to endpoints within the Talend Route (Camel Context) are really the Camel Routes. Yes, it is confusing and quite frustrating that this nomenclature has been used. Going back to my first sentence, since the cMQConnectionFactory is started at the very beginning of the Camel Context, the curly brackets method is interpreted as a literal Java String.

 

EDIT: I have just seen your last post while checking something you had said. The solution you have been given makes sense. I've not tried it, but will give it a go next time I need to do this.

Anonymous
Not applicable

That tutorial is what got me going with these. Once you get the hang of it, it is really powerful.