Manually checking and setting contexts
This method is very similar to the tContextLoad
; however, instead of using tContextLoad
to select the file and load and validate the key value pairs, this is performed by custom Java code, within a tJavaRow
component, as described in the recipe Setting context variables and globalMap variables using tJava in Chapter 5, Using Java in Talend.
Pros
This method allows the finest grain selection and setting of context variables.
As with the implicit context load and tContextLoad
, use of external files is a good practice for managing contexts, because they are less likely to be overwritten during deployment.
This method provides the developer with the ability to validate individual values and kill the job if they are invalid, without having to worry about local context variables.
Cons
The fine grain can also be a weakness. This method does give much more freedom to developers and could become unmanageable.
More manual code is required to manage this method than...