Hello - wonder if anyone has successfully configured a Shiny data source using MotherDuck (DuckDB) on Connect Cloud?
I'm trying to set up a small demo Shiny App on Connect Cloud that uses MotherDuck (DuckDB cloud compute engine) as the data source. Of course, it "Works fine on my local machine", however, the publishing to Connect Cloud fails at this point:
2025-10-16T18:41:25-07:00 Invalid Error: IO Error: Extension "/home/connect/.local/share/R/duckdb/extensions/v1.4.0/linux_amd64/motherduck.duckdb_extension" not found.
2025-10-16T18:41:25-07:00 Extension "motherduck" is an existing extension.
2025-10-16T18:41:25-07:00
2025-10-16T18:41:25-07:00 Install it first using "INSTALL motherduck".
In the connection function, I've included the INSTALL statement as prompted in the error message using this function:
md_connect <- function(config_env = 'default') {
config <- config::get(config = config_env)
conn <- DBI::dbConnect(duckdb::duckdb(), ":memory:")
# Authenticate with MotherDuck Token
DBI::dbExecute(conn, "INSTALL motherduck") # <--- this doesn't work as expected
DBI::dbExecute(conn, "LOAD motherduck")
if (config$md_token != "") {
auth_query <- paste0("SET motherduck_token='", config$md_token, "';")
dbExecute(conn, auth_query)
}
# Attach to MotherDuck
DBI::dbExecute(conn, "ATTACH 'md:'")
# return the connection object
conn
}
Thanks for any suggestions.