Unable to get globalvaraible value in tjava

Five Stars

Unable to get globalvaraible value in tjava

Hi People,

I am newbie to talend...and was trying out to build a job....

My requirement is

tRowGenerator >>   Row1>>tSetGlobalVariable>>row2>>tJava

I have generated one random field called name using TalendData.getname() function. E.g (Aarya)


in tSetGlobalVariable

For Parameter "myKey"

Value " (String)globalMap.get(row1.name)"


In tjava



unfortunately I output as myKey and I expect Aarya.


Can some one explain what am I doing wrong?


Tags (1)
Forteen Stars

Re: Unable to get globalvaraible value in tjava



it looks like you do wrong, check for begin some information here - https://help.talend.com/reader/KxVIhxtXBBFymmkkWJ~O4Q/yjzLPbgCOJF~YJGNskhmMQ


you do not need to use (String)globalMap.get(row1.name) in tSetGlobalVar, but need when use it



for assign row1 to variables - check documentation about tFlowToIterate - it do this for you


What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.



Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.