One Star

Return value

Hi,
My Talend job is executed by Nagios, i would like to return a value generated by a tJava component at the end of the execution.
I've heard about the tBufferOutput but how can i link it with the tJava ?
Thanks
3 REPLIES
Community Manager

Re: Return value

Hello
On tJava, put the return value to a global var, eg: globalMap.put("value",value).
On the next subJob, using tFixedFlowInput to generate this value and link it to tBufferOutput. eg:
tJava
|
tFixedFlowInput---tBufferOutput
On tFixedFlowInput, only generate one row, define one filed, set the value as; (String)globalMap.get("value")
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: Return value

Hi ,

if we .sh file is returning some value if we run .sh file will it be shown in terminal or command promt?

Moderator

Re: Return value

Hello himateja,

For debug, you can add some tLogRow components in the job to print the data on the console. Add this word "pause" at the end line of job script(.bat or .sh), to see the message printed on the command promt before the window closes.

Best regards

Sabrina

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