2

每当我尝试执行强制它在 Spotfire Server 上运行的数据函数时,我都会遇到持续错误。

如果运行位置配置设置为“强制本地”或“默认”,则该脚本在 R Studio 和 Spotfire 上运行良好。

当我使用 Force Server 时,执行查询时收到以下错误消息:

Could not execute function call. TIBCO Spotfire Statistics Services returned an error: 
'Error in sqlQuery(myconn, mappingQuery, errors = TRUE, rows_at_time = : first argument is not an open RODBC channel'.   
 at Spotfire.Dxp.Data.DataFunctions.Executors.RemoteFunctionClient.OnExecuting(FunctionClient funcClient)    
 at Spotfire.Dxp.Data.DataFunctions.Executors.AbstractFunctionClient.<RunFunction>d__0.MoveNext() 
 at Spotfire.Dxp.Data.DataFunctions.Executors.SPlusFunctionExecutor.<ExecuteFunction>d__0.MoveNext() 
 at Spotfire.Dxp.Data.DataFunctions.DataFunctionExecutorService.<ExecuteFunction>d__6.MoveNext()

即使我有一个简单的脚本和如下所示的查询,结果也是一样的:

require(RODBC)

myconn   <- odbcDriverConnect("Driver={SQL Server};Server=MY_SERVER;Database=MY_DATABASE;Trusted_Connection=True")
# myconn <- odbcDriverConnect("Driver={SQL Server};Server=MY_SERVER;Database=MY_DATABASE;UID=MY_USER;Pwd=MY_PASSWORD") ## Same result with trusted connection or user/password
query    <- "SELECT * FROM MY_TABLE"
df       <- sqlQuery(myconn, query)

print(df)

有没有人见过这个?

谢谢!

4

1 回答 1

0

The error seems to suggest that the "RODBC" package's 'odbcDriverConnect()' function might not be finding the ODBC drivers it needs on the server that TIBCO Spotfire Statistics Services (TSSS) is installed on.

Try installing the required odbc drivers on the machine where the TIBCO Spotfire Statistics Services is installed.

于 2018-06-27T23:50:38.390 回答