Using tContextLoad to load contexts

A second method for defining context variables in different environment is to store them in a file or database external to Talend, and then load them as part of a job.

Getting ready

Open the jo_cook_ch06_0020_loadContextData job.

How to do it...

The steps for using tContextLoad to load contexts are as follows:

  1. Open the tFileInputDelimited component and change the delimiter to, so that it matches the format in the file.
  2. Drag a tContextLoad component onto the canvas and link it to tFileInputDelimited.
  3. Open tContextLoad, and click on the option Print operations.
  4. Unclick Disable warnings.
  5. Run the job.

How it works...

The context file contains name/value pairs in the form of key=value, so setting the delimiter to = means that ...

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.