问题
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.
来源:https://stackoverflow.com/questions/44209681/running-talend-jobs-with-python