Adding command-line context parameters

Often, it is required that one or more parameters are passed at runtime to a process to affect its behavior, such as a schedule identifier, or for instance, if the process is common for many different sources, a file identifier. This recipe shows how parameters can be passed into a job via the command line.

Getting ready

Export the job jo_cook_ch11_0030_differentContextVariable.

How to do it…

  1. Run the exported job.
  2. You will see the output contains Hello World.
  3. Open the launcher.
  4. Scroll to the end of the line, and add the line --context_param name=Dave.
  5. Run the job again. You will see that the output now contains Hello Dave.

How it works…

Adding the new value to the command line instructs Talend to override any value ...

Get Talend Open Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.