Reputation: 2927
I'm trying to use the pool
package for the first time. I've created a Pool object with the code below.
pool <- dbPool(drv=odbc::odbc(),
dbname="dbname",
driver="SQL Server",
server="server",
uid="user.name",
pwd="password",
port=1433)
This results in the following warning message.
# warning messages from top-level task callback '1'
# Warning message:
# Could not notify connection observer. trying to get slot "info" from an object (class "Pool") that is not an S4 object
> class(pool)
# [1] "Pool" "R6"
Since this is my first time using pool
I'm unsure if it is safe to proceed despite the warning. Can someone with more experience with pool
share some insight into the possible repercussions and/or causes of this warning message?
I'm able to successfully get data using the Pool object as my connection.
table <- DBI::SQL("TableName")
query <- glue::glue_sql("select * from {table}", .con=pool)
dbGetQuery(pool, query) ## returns expected data
I'm using the development version of pool
but I've also tried using the latest version on CRAN, both have resulted in the aforementioned warning message.
Upvotes: 1
Views: 358
Reputation: 1015
I also had this error message. A thread on the RStudio forums suggests to update the DBI, odbc and pool packages to the latest versions, which worked for me
https://community.rstudio.com/t/how-to-use-dbpool-with-rodbc/5609/3
Upvotes: 1