What does this dbWriteTable message mean?

dbplyr

#1

This dbWriteTable statement works fine to create a MS SQL table, but what does the message mean?

dbWriteTable(myDatabase, SQL("dbo.myTable"), myData)            
Note: method with signature �DBIConnection#SQL� chosen for function �dbQuoteIdentifier�,
 target signature �Microsoft SQL Server#SQL�.
 "OdbcConnection#character" would also be valid

Is there some alternate coding that I should be using?


#2

That looks like S4's message for potentially ambiguous function dispatch (please see the Method Dispatch section of this for some notes).

It roughly means your first two classes are something like "OdbcConnection SQL" and the dispatch didn't have a method with that exact class signature and had to choose between "OdbcConnection charater" and "DBIConnection SQL" when quoting identifiers. The idea is that OdbcConnection is likely a more detailed sub-class of DBIConnection and SQL is a more detailed subclass of character. So the method chosen: treat the OdbcConnection as if it were merely a DBIConnection and treat the SQL as SQL is probably a good choice.

This is something that should be fixed in the package. You could probably make it go away by passing in the table name with some other class than SQL. I see you have a schema specification, I don't know if this will work but I am wondering if instead of SQL("dbo.myTable") you try DBI::Id(schema="dbo", table="myTable") and you might get a different result.