0
1. Passing Context Environment :-
We can create different context group in the Talend Job and set the values of the context variables according to these groups. e.g. we can create a context group for Dev (Development environment) , Prod (Production environment) and provide different values to context variables based on the environment.
context_demo_run.bat --context=Prod
For using context group Dev defined in the Job:
H:\demo\context_demo> context_demo_run.bat --context=Dev
If we do not provide the context group then Job will automatically use the default context group defined in the Job.
For using default context group defined in the Job:
H:\demo\context_demo> context_demo_run.bat
2. Overriding Context Variables - We can also override the values of the individual context variables/parameters through command line. We can pass the argument --context_param followed by a name of the parameter defined in the Job and its value to override any of the parameters in the context. Use the following command to override the value of context parameter or variable.
H:\demo\context_demo> context_demo_run.bat --context_param <param-name>=<param-value>
For example: To override the value of context parameter DB_NAME to localhost
H:\demo\context_demo> context_demo_run.bat --context_param DB_NAME=localhost
0Awesome Comments!