Switch between contexts

One Star

Switch between contexts

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

Re: Switch between contexts

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 )