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)
1 REPLY
Fifteen Stars

Re: Implicit context load from a database

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.
Rilhia Solutions