I wouldn't recommend to use dbWriteTable() or copy_to() for large table uploads. Ideally, we would like to keep the data transformation inside the database and not in R, this can be done using dplyr: http://db.rstudio.com/overview
May I ask what operation do you need to do in R and then upload to the DB?
hi @edgararuiz thanks for helping. no, the point is that i have access to a remote database and I need to upload a dataframe there so that I can merge with other tables there . so using writetable or others is necessary. what i don't understand is that i am able to create tables with sql statements, but somehow dbwritetable cant. any ideas? thanks!!
actually when I try to write a table with dbsendquery, studio crashes entirely. this is weird, as i am able to run a "write table" query in python with pyodbc cursor.execute(myquery)...
any ideas?
I access SQL server regularly, the connection I use is as follows:
library(odbc)
con <- dbConnect(odbc(), Driver = "ODBC Driver 17 for SQL Server",
Server = "my-server", Database = "my-database", UID = "my-login",
PWD = "my-password", Port = 1433)
MS SQL Server is not my preferred RDBS for working from R (Postgres is much more fun) but it works; and the benefits of an MS ecosystem (Power BI and stuff) are unquestionable, especially in a corporate environment.