tidyverse / duckplyr

A drop-in replacement for dplyr, powered by DuckDB for performance.
https://duckplyr.tidyverse.org/
Other
253 stars 15 forks source link

No connection to duckdb file via as_duckplyr_tibble #253

Open sparrow925 opened 3 weeks ago

sparrow925 commented 3 weeks ago

Super excited to see #266, so I tried it out with v0.4.1.9003 -- encountered the following error:

library(tidyverse)

con = DBI::dbConnect(duckdb::duckdb(), "foo.db") #db on disk
DBI::dbWriteTable(con, name = "iris", value = iris)
dplyr::tbl(con, "iris") %>% duckplyr::as_duckplyr_tibble()

_Error in duckdb$rel_fromsql(con, sql) : attempt to apply non-function

bschneidr commented 3 weeks ago

I'm really hoping we could use 'duckplyr' to connect to DuckDB files, so that it's possible to bypass the somewhat slow 'dbplyr' translation process. If I understand the ticket correctly, that's what you're trying to do here.

krlmlr commented 3 weeks ago

Thanks for the heads-up. Working on it, shouldn't be too long.