在SSI中执行Python脚本的过程任务
我正在尝试通过SSIS执行过程任务执行Python脚本。 Python脚本是正确的。该脚本从yfinance读取数据并进行一些计算,然后将计算数据导出到数据库中。我需要每天执行此脚本。我制作一个用于执行脚本文件的批处理文件:
我使用ssis执行SQL任务并配置属性,请参见:
但是我收到此错误:
[执行过程任务]错误:在执行“ D:.... \ batch_ssis.bat”“”“”中,过程退出代码为“ 9009”,而预期为“ 0”。
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:
I used SSIS Execute SQL Task and configure properties follow:
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".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
该退出代码9009来自Windows,它试图执行batch_ssis.bat,并且无法解析批处理文件中包含的信息,
请确保您的路径d:..... \,如果您确实添加了空格对您的路径的报价,因此看起来“ d:......”
还确保在您的路径Windows环境变量,以便您可以从Windows中任何目录中调用Python
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
设置 failTaskIfturnCodeisNotSuccessvalue false。
今天对我有用。它忽略了批处理脚本返回的任何退出代码。
就我而言,预期的工作运行良好,但由于返回了9009退出代码,因此SSIS软件包失败了。我还没有弄清楚为什么。
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.
这不是正确指向您的文件。
找不到文件。
错误代码9009表示找不到错误文件。错误可能发生在蝙蝠中或计算机上的某个地方(例如Windows或Mac),但是错误本身只是一条不良的路径。
尝试直接指向Python文件,看看是否有任何区别您掩盖的路径不正确。
另请参阅此视频是否可以提供帮助:
fix 9009错误
This is not correctly pointing to your file.
The file was not found.
Error Code 9009 means error file not found. The error can be happening in the Bat or somewhere on your machine(like Windows or Mac), but the error itself simply means a bad path.
Try to point directly to your Python file, and see if any difference seems the Path you mask is not correct.
See also if this video can help:
Fix 9009 Error