how do I capture tssh output?

One Star

how do I capture tssh output?

I have the component set to go to global variable, and the documentations says it will go to STDOUT, but how do I get at it? My job reads a database, does some filters, and then runs a sub-job. The subjob does an ssh, reads data, and needs to return the data to the calling job. I think I need to somehow push stdout into a tbufferoutput to return to the calling job, but I don't know how, and I can't find any tssh examples that demonstrate this functionality. Can anyone help?
Moderator

Re: how do I capture tssh output?

Hi,
Do you want to return a value from a child job to the parent job?
Could you please take a look at KB article about:TalendHelpCenter:Returning a value from a child Job to the parent Job to see if it is Ok with you?
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.
Twelve Stars

Re: how do I capture tssh output?

tSSH store result into variable, You can access to this variable by - ((String)globalMap.get("tSSH_1_STDOUT")), same with errors - ((String)globalMap.get("tSSH_1_STDERR"))
the work with it as any other variables 
     
-----------