Return value

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
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.

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

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch