Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Eric_Talend
Creator
Creator

To display an entered variable

Hello,

I have a job and I enter a data which is a year : 2020 or 2019 ...

So, I have to display this data but I can't do it.

I add a tJava component and I add this line :

System.out.println(" my year : ");

System.out.println(globalMap.get(context.annee));

Do you have the solution ?

Kind regards.

Labels (2)
2 Replies
prg
Employee
Employee

Hello @Eric Vincent​ ,

 

Could you please provide us the value of context.annee? Please provide us the screenshot of your tjava component and the error you are getting, if any?

 

Thanks,

Vaishnavi

Eric_Talend
Creator
Creator
Author

Hello,

 

that's what I do.

 

1 * for my tests, I created a job with only one tJava component with this code :

System.out.println("yearData");

System.out.println(context.yearData);

and I add in context area the data : "year" like an integer.

 

I launch my job, I enter my year in the input box.

I have this result :

"

[statistics] connecting to socket on port 3444

[statistics] connected

yearData

2007

[statistics] disconnected

"

So it is OK.

 

2 * Now, I add this part in my main job where there are several treatments.

I put my tJava component at the end of the job.

I launch my job, I enter my year in the input box.

But this time, I have this result that's is not OK 😞

 

yearData

null

[statistics] disconnected

 

 

My question : why I have this difference

 

Kinds regards.