One Star

Switch between contexts

Hello,
I want to switch between several db-connections (or use different config parameters) depending on the environment in which the job is going to run.

1) How can I switch the context (eg. "production", "development", "test") within Talend ("eclipse")?
2) How do I provide a command parameter with which I can set the context when running the job from the console?

Thanks in advance
1 REPLY
Employee

Re: Switch between contexts

Hello,
1) witin talend open studio
a) define all your context ( dev , prod ... ) in context view of the job.
b) To Run Job, go to Run Job view, select Run context in the left part , and RUN it
2) When you export job script, you can choose the run context.
and/or tou can edit the .bat/.sh file and change the value of the context parameter. ( --context=default )