使用 SSIS 包中的 Python 脚本预测数据 [英] Predicting data with Python script in an SSIS package

查看:24
本文介绍了使用 SSIS 包中的 Python 脚本预测数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道 Microsoft 在其 SQL Server 机器学习服务中包含 Python,但是这仅适用于 SQL Server 2017 及更高版本,这是我的服务器目前不满足的要求.

I'm aware of Microsoft's inclusion of Python in their Machine Learning Services for SQL server, however this is only available for SQL Server 2017 and up, which is a requirement my servers do not currently meet.

在这种情况下,我想完全在 SSIS 中部署我的生成预测和训练模型管道,即:

With that being the case, I wanted to deploy my generate-predictions-with-trained-model pipeline entirely within SSIS, I.E:

  1. 从我的数据库中获取数据
  2. 将其传递给 Python 脚本数据流任务,该任务会导入经过训练的模型、生成预测并将其传递给下一个数据流任务
  3. 将预测写入数据库

有没有办法完全在 SSIS 中做到这一点,或者是否有必要只使用 Execute Process Task 来启动 Python 脚本并将其单独存储在服务器上的某个地方?

Is there a way to do that entirely within SSIS, or will it be necessary to just use Execute Process Task to kick off the Python script and have that stored separately on the server somewhere?

干杯

推荐答案

唯一的方法是将脚本保存到文件中并使用 执行流程任务.

The only way to do that is to save the the script into a file and execute it using an Execute Process Task .

您不能在 SSIS 包中编写 Python 脚本.基于 官方文档 :

You cannot write python scripts within SSIS packages. Based on the official documentation :

脚本任务使用的 Microsoft Visual Studio Tools for Applications (VSTA) 开发环境支持 Visual Basic 2005 和 Visual C# 编程语言.

The Microsoft Visual Studio Tools for Applications (VSTA) development environment used by the Script task supports the Visual Basic 2005 and Visual C# programming languages.

这篇关于使用 SSIS 包中的 Python 脚本预测数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆