duckdb_aws icon indicating copy to clipboard operation
duckdb_aws copied to clipboard

`duckdb.connect()` `config` argument doesn't accept any S3 configuration options in Python API

Open nicklausroach opened this issue 1 year ago • 2 comments

When trying to add s3-specific configurations to the connection config, I'm met with any of:

duckdb.duckdb.InvalidInputException: Invalid Input Error: Unrecognized configuration property "s3_access_key_id" duckdb.duckdb.InvalidInputException: Invalid Input Error: Unrecognized configuration property "s3_secret_access_key" duckdb.duckdb.InvalidInputException: Invalid Input Error: Unrecognized configuration property "s3_region"

I could be doing something wrong here, but all other config options seem to work other than the s3-related options. Example snippet:

>>> duckdb.connect(database=':memory:', read_only=False, config={'s3_secret_access_key': ''})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
duckdb.duckdb.InvalidInputException: Invalid Input Error: Unrecognized configuration property "s3_secret_access_key"

nicklausroach avatar Aug 09 '24 13:08 nicklausroach

This indeed does not work because at startup the httpfs extension is not yet loaded! please use secrets instead!

samansmink avatar Aug 09 '24 13:08 samansmink

Ah I knew it was something stupid I was doing! That may be worth calling out in the docs, I assumed I could add those s3 configurations at connection time and then load the httpfs extension. Regardless, thank you for your help @samansmink!

nicklausroach avatar Aug 09 '24 14:08 nicklausroach