-
Notifications
You must be signed in to change notification settings - Fork 0
Implement duckdb #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement duckdb #428
Conversation
randrescastaneda
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shahronak47,
Thank you for your PR. This is looking great. I reviewed the code and have a few points to discuss:
- The lines
DBI::dbGetQuery(con, "select * ")cannot be executed because theconobject is not available in the global environment. However, this should not be an issue if subsequent calls topip()use theconobject created in the previous call. - Running
pip(country = "AGO", year = "all", lkup = lkup, fill_gaps = TRUE)produces the following warning:Warning message: Connection is garbage-collected, use dbDisconnect() to avoid this. - The idea of displaying whether the data is loaded from cache is great. However, this message should only appear in interactive mode, right?
- We need a separate DuckDB file for each release, and it should not be placed at the root of the folder. The cache must be release-dependent.
- The
conobject should be created in the.Rprofilewhen the lookups are created.
Let's discuss this further in a phone call.
Thank you.
…eam/pipapi into implement-duckdb
|
Hi Andres, Based on our discussions here are the changes implemented -
|
…eam/pipapi into implement-duckdb
…eam/pipapi into implement-duckdb
|
Hi @randrescastaneda , one thing to note here is the latest |
OOHHH. Ok. Let's do it. It is not ideal, but it is what it is. Thanks for letting me Know. Best, |
Hi Andres, I have added the code in
implement-duckdbbranch. First you need to set the path of duckdb file that I have in E drive.There is a vignette called duckdb-caching.Rmd which explains the process. There are two master files
rg_master_fileandfg_master_filein duckdb. They are selected based on thefill_gapsargument. I have kept both of them as empty for you to test and verify the examples.Here are examples for you to try out. Please create the
lkupobject to try the following code.After you have got hang of it, you can try out different
pipcalls and verify the caching algorithm and the result.