-
Notifications
You must be signed in to change notification settings - Fork 9
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
Install duckdb from r-universe #109
Comments
Basically turn the custom duckdb install into:
https://duckdb.r-universe.dev/ui#package:duckdb Then once that is installed, the following will work (I think we technically only need the install once, and then load after each connection going forward...)
|
@jonkeane I'm messing with this a bit, and I'm getting 0.5.0 installed fine, but I haven't figured out how to get the > callr::r(function() {
+ con <- DBI::dbConnect(duckdb::duckdb(dbdir = ":memory:"))
+ on.exit(DBI::dbDisconnect(con, shutdown = TRUE))
+ DBI::dbSendStatement(con, "INSTALL 'tpch';")
+ }, list(), libpath = c(arrowbench:::custom_duckdb_lib_dir(), .libPaths()))
Error: callr subprocess failed: rapi_execute: Failed to run query
Error: IO Error: Failed to download extension "tpch" at URL "http://extensions.duckdb.org/9c4001d16/osx_arm64/tpch.duckdb_extension.gz"
Extension "tpch" is an existing extension.
Are you using a development build? In this case, extensions might not (yet) be uploaded.
Type .Last.error.trace to see where the error occurred
> callr::r(function() {
+ con <- DBI::dbConnect(duckdb::duckdb(dbdir = ":memory:"))
+ on.exit(DBI::dbDisconnect(con, shutdown = TRUE))
+ DBI::dbSendStatement(con, "LOAD 'tpch';")
+ }, list(), libpath = c(arrowbench:::custom_duckdb_lib_dir(), .libPaths()))
Error: callr subprocess failed: rapi_execute: Failed to run query
Error: IO Error: Extension "/Users/alistaire/.duckdb/extensions/9c4001d16/osx_arm64/tpch.duckdb_extension" not found
Type .Last.error.trace to see where the error occurred
> callr::r(function() {
+ con <- DBI::dbConnect(duckdb::duckdb(dbdir = ":memory:"))
+ on.exit(DBI::dbDisconnect(con, shutdown = TRUE))
+ DBI::dbGetQuery(con, "select scale_factor, query_nr from tpch_answers() LIMIT 1;")
+ }, list(), libpath = c(arrowbench:::custom_duckdb_lib_dir(), .libPaths()))
Error: callr subprocess failed: rapi_prepare: Failed to prepare query select scale_factor, query_nr from tpch_answers() LIMIT 1;
Error: Catalog Error: Table Function with name tpch_answers does not exist!
Did you mean "duckdb_views"?
LINE 1: select scale_factor, query_nr from tpch_answers() LIMIT 1;
^
Type .Last.error.trace to see where the error occurred Am I doing anything obviously wrong here? Does
mean we really just need to wait for them to put something at http://extensions.duckdb.org/9c4001d16/osx_arm64/tpch.duckdb_extension.gz ? I'm getting a 403 when I GET that directly...do I need to auth somehow? |
Ouch, yeah in my experience, the extensions do take a while to be built and uploaded. Which would make this not super helpful if much of the time we install the extension isn't yet available. I wonder if it's possible to install from one version back on r-universe? I looked at https://duckdb.r-universe.dev/ui#api but didn't find an obvious answer. Alternatively, we could wait for the duckdb release which should have a (more) stable extension setup. |
This endpoint makes it look like yes?
not sure yet how hit that most easily or figure out what versions are available, but I'll dig a little more |
If we install {duckdb} from r-universe instead of building it from scratch, our r-release builds should be much much faster
The text was updated successfully, but these errors were encountered: