我目前正在按照Microsoft的tutorial尝试使用SQL Server的Python新机器学习服务。我正在使用 Jyputer Notebook 和 RevoScalepy 在Win10 x64,SQL Server 2017 x64上。
通过 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)
但是,当尝试通过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.