Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Joe_S_
Contributor
Contributor

Returning output filename to Python as a string

Hello everyone,

I have a Talend process that gets called from Python. The process takes a payload file and transforms the data into a different format. I need to return the output file name to the original Python script so it can then deliver the file via email or SFTP. The only return value I can get Talend to return is the exit code. I can print the value to the console screen easy enough, but the Python developer is requesting that my Talend job actually return the value using the return method. Has anyone done something similar? I feel like I am over complicating this, it sounds like it should be easy enough.

Labels (1)
  • Other

1 Reply
Anonymous
Not applicable

Hi

The talend job only returns the exit code, you can see the code as below in the generated code.

 

int exitCode = J1Class.runJobInTOS(args);

System.exit(exitCode);

 

You can store the value in an application such as DB, FTP, file etc in the job, then, read the value back in Python script.

 

Regards

Shong