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:
Open the
tFileInputDelimited
component and change the delimiter to, so that it matches the format in the file.Drag a
tContextLoad
component onto the canvas and link it totFileInputDelimited
.Open
tContextLoad,
and click on the option Print operations.Unclick Disable warnings.
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 we can identify each as columns in the Talend schema.
When we click on the print operations, it causes Talend to print out what is happening with the context.
There’s more…
The tContextLoad
does have some additional features that you may wish to use...