0

dbplyr's reference page begins showing how to create an in-memory SQLite database and copy over a dataset:

library(dplyr, warn.conflicts = FALSE)
con1 <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
copy_to(con1, mtcars)

It does this utizing RSQLite::SQLite(). Is there a similar way to create an in-memory Teradata database and copy over a dataset. I'd imagine it could look something like:

library(dplyr, warn.conflicts = FALSE)
con2 <- DBI::dbConnect(RTeradata::Teradata(), ":memory:")
copy_to(con2, iris)

Looking around it seems there's no such thing as RTeradata::Teradata() so I'm not sure what to do.

If you're curious about my motivations I want to be able to create reproducible examples of errors I get while using dbplyr with Teradata SQL databases. I don't know of a way to do this at the moment.

Display name
  • 4,153
  • 5
  • 27
  • 75

1 Answers1

1

You should be able to use the DBI package after installing the teradara drivers. If you want something specifically for dplyr, have a look at tdplyr.

fra
  • 832
  • 6
  • 14