1

我目前正在按照 Microsoft 的教程尝试 SQL Server 的新 Python 机器学习服务。我在 Win10 x64、SQL Server 2017 x64 上,使用Jyputer NotebookRevoScalepy

通过pyodbc验证,与数据库的连接不是问题:

import pyodbc

sql_conn = pyodbc.connect(connection_string)
query = 'SELECT * from dbo.iris_data'
df = pd.read_sql(query, sql_conn)

df.head(5)

来自 pyodbc 的输出

但是,当尝试通过 RevoScalePy 的rx_exec()在 SQL Server 上运行函数时,我收到错误消息:

RuntimeError: revoscalepy function failed.
====== username ( process 0 ) has started run at 2019-02-18 09:25:58 W. Europe Standard Time ======

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'username'.



[Microsoft][ODBC Driver Manager] Connection not open



ODBC Error in SQLDisconnect

Could not open data source.
ImportDataSource function failed. Please see the console output for more information.
4

0 回答 0