在SSI中执行Python脚本的过程任务

发布于 2025-01-25 09:55:33 字数 627 浏览 1 评论 0原文

我正在尝试通过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:

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".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

黄昏下泛黄的笔记 2025-02-01 09:55:33

该退出代码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

忘羡 2025-02-01 09:55:33

设置 failTask​​IfturnCodeisNotSuccessvalue 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.

焚却相思 2025-02-01 09:55:33

这不是正确指向您的文件。

找不到文件。

错误代码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.

9009 error

See also if this video can help:

Fix 9009 Error

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文