Using variable obtening by tJava_row and used on tSetGlobalVar

Seven Stars

Using variable obtening by tJava_row and used on tSetGlobalVar

Hello, I'm her again, Cat Tongue

I have a job like this ,

tFileInputXML ------> tXMLMAP------>tJavaRow------>tSetGlobalVar------->tSendMail

 

I extracte some data in my inputfile and in my tJava I have a condition:

string var =((String)globalMap.get("stuff'));
if( var !=null)
{
//execute programme 
print = var;
}
else
{
system.out.println("Pass"); }

(if condition is, if I get some error string i set the file name in a var and i send a email with the file who get the error)

 

so in my tSendMail I would like to use the print variable in my if condition, or setting in my tSetGlobalVar, how can I do ?

Thx a lot 


Accepted Solutions
Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

Ok i find the solution for this , thx ! I used globalMap.Put("name",date);
btw I have an other problem, gonna open new discussion.

All Replies
Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

Solved, I use the tLogRow.ERROR_MESSAGE

Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

Update:
Its not working
Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

use the tLogRow.ERROR_OUTPUT

Regards
Aashish
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

I don't have tLogRow.ERROR_OUTPUT, I have only ERROR.MESSAG or NB.LINE:/
Twelve Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

use globalMap.set("name","Value") in your tjavarow
or
ann an output and set it on output_row.rowname=var;

de careful, globalMap is a global variable, row.rowname is not.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

How can I set ?
I don't understand how can i set with globalmap.set :/
Seven Stars

Re: Using variable obtening by tJava_row and used on tSetGlobalVar

Ok i find the solution for this , thx ! I used globalMap.Put("name",date);
btw I have an other problem, gonna open new discussion.

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now