duckdb / duckdb-r

The duckdb R package
https://r.duckdb.org/
Other
131 stars 23 forks source link

Cannot Connect to S3-Compatible Data Store #224

Open ckarnes opened 2 months ago

ckarnes commented 2 months ago

I am unable to connect to connect to an s3-compatible data store using the following command:

con <- dbConnect(

  duckdb::duckdb(
  dbdir = "s3://test/mydatabase.duckdb", 
  config = list(s3_access_key_id=<accesskey>,
                s3_secret_access_key=<secretkey>,
                s3_region='us-east-1',
                s3_endpoint='example.com',
                ,s3_url_style='path'
                )
  )
)

I get back this in the console: Error in h(simpleError(msg, call)) : error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': cannot open the connection In addition: Warning message: In file(con, "w") : cannot open file 's3://test/mydatabase.duckdb': No such file or directory

I use similar arguments in the aws.s3 package and am able to get information out of the bucket.

cfljam commented 1 month ago

Is this functionality that could be achieved by compiling with the httpfs extension? The ability to attach a remote duckdb is one of the major attractions but its not at all clear if or how this can be achieved currently with a database (though duckdbfs allows attaching tables via s3