Running Talend jobs with Python

2019-08-27 06:42发布

问题:

I'm trying to automate some stuff I would otherwise have to do manually, so I can run one python script instead of taking a whole bunch of steps. I want to find a way to run a Talend job from the python script.

How do I accomplish this? Is it even possible?

回答1:

Oops! sorry.
From the Studio, build the job to get an autonomous job you can launch from command line.
Extract the files from the generated archive.
Search for folder "script/yourJobname".
Check the syntax from one of the .bat or .sh depending of which one you prefer. Launch the jar file using subprocess.call (or other way to execute a jar file from Python).

Hope this helps.
TRF



回答2:

As soon as you can run a Python script from command line, you should be able to run it from Talend using tSystem component.