Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Implicit context load from a database

Hello, I am trying to set an implicit context load from a database on my project.
We will have three environments : DEV, TEST , PROD.
For each environment , I'd like to have a database, and a table in each database (with key and value fields) will serve for the implicit context load.
Problem is, I can't see how I could set up this kind of configuration without having the developer putting the values of the PROD/TEST environment in the studio. And I don't want the developer to have this kind of responsability.
One alternate solution could be to use an implicit context load from a file to fill in the parameters for this database, and then have a prejob in each job to get the other context parameters to run the job. But then I have two sources to keep up to date.
If someone thinks of something else, I'd be happy to get it.
(I am using Talend Data Services Platform 6.0.1)
Labels (2)
1 Reply
Anonymous
Not applicable
Author

Why not just have an outer "wrapper" job that is used to retrieve context variable values for the db you want to host your implicit context variables. Then use this job to call your "working" job and supply the context variable values to it. This job can have its implicit context variable settings supplied by context variables.
This *should* work because the wrapper job is essentially calling the inner job and supplying context variable values before it has started. So as soon as it is initiated and tries to use the context variable values for the implicit context variable database, the context variables pointing to your database will be set. 
I had a similar issue with setting the AMC database connection settings at runtime (depending on environment). Having a wrapper job solved this. I believe it should solve it for your issue as well.