'Execute Process Task in SSIS for Python Script

I'm trying to execute a python script by SSIS Execute Process Task. The Python script is correct. This script read data from yfinance and do some calculation, then export the calculation data into database. I need to execute this script every day. I make a batch file for execution of script file:

enter image description here

I used SSIS Execute SQL Task and configure properties follow:

enter image description here

But I received this error:

[Execute Process Task] Error: In Executing "D:....\batch_ssis.bat" "" at "", The process exit code was "9009" while the expected was "0".



Solution 1:[1]

That exit code 9009 comes from windows, it tries to execute batch_ssis.bat and can't resolve the information contained in the batch file

Make sure you do not have spaces in your path D:.....\ , if you do add quotations to your path so it looks like this "D:......"

Also ensure that python is installed and configured in your PATH windows environment variable so that you can call python from any directory within windows

Solution 2:[2]

Set FailTaskIfReturnCodeIsNotSuccessValue to False.

This worked for me today. It ignores whatever exit code the batch script returns.

In my case the expected job runs well but SSIS package failed because of the 9009 exit code returned. I still haven't figured out why.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ockert
Solution 2 JovialEmperor