Closed talegari closed 7 years ago
Dear Srikanth,
Thanks for your question:
Your script is almost correct: you should remove the line "read_chunkwise", and then it is working, since the write_chunkwise
function can operate on a tbl_ object. I will update the documentation, and add functionalty so your original code will work.
library("chunked")
library("RSQLite")
dbcon <- dbConnect(SQLite(), "test.sqlite")
dbWriteTable(dbcon, "mtcars", mtcars)
dbDisconnect(dbcon)
tbl<-
( src_sqlite("test.sqlite") %>%
tbl("mtcars")
) %>%
write_chunkwise('test2.csv', chunk_size=10)
Best regards,
Edwin
Dear Edwin,
Thanks for the quick update! The code that produced the error now works. Cognitively, it is intuitive to set chunksize at 'read' stage.
I agree :-)
Dear Edwin,
I encountered an error while trying to reproduce you codes on the slides(UseR! 2016) of the package on page 11 named 'Scenario 3: DB -> TXT'.
This produces the error:
Reading the function
read_chunkwise
makes me feel that no method is present for atbl
. Am I making a mistake?rsqlite version:
1.1.2
dplyr version:0.5.0
chunked version:0.3
Regards, Srikanth KS