Utilitaires
Scripts
Divers
Jeux
Rechercher
Quillevere.net
Computer paradigms

Talend: avoid modifying context variables during a job

04/01/2022

On Talend software, on a job, it's possible to assign the value of a context variable, via a tJava, by writing for example:

context.myVariable="abc";

There is no error and most of the time it goes very well.

Except when using the job in a multi-threaded context of TAC (Talend Administration Center) type: it may indeed happen that the variable is assigned to another Thread. Thus, the context variables are not thread-safe (even if in a classic multi-threaded use, on Open Talend Studio, this goes very well).

This problem was not observed when using the globalMap. It is therefore recommended to use this variable.

In general, it is therefore absolutely necessary to avoid reassigning the context variables in a job, and to consider them as constants.

Dernière modification le 07/01/2022 - Quillevere.net

Commentaires

No inscription needed if you wish to

Search in this website

fr en rss RSS info Informations