-
Notifications
You must be signed in to change notification settings - Fork 88
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
Unable to connect to duckdb database residing on S3 #249
Comments
Huh; the |
The s3 attach via httpfs story is a bit of a strange one right now - I think you can only set auth via environment variables or query parameters |
ack, thank you @Mause! I swear I've made it work before, let me see if I can sort out how. |
Maybe double check the environment variable names? https://duckdb.org/docs/extensions/httpfs#configuration-1 |
I am also interested in this use case. I'm trying to perform a query on a DuckDB database in S3. I'm pretty sure my env vars are correct because I'm able to run a query like:
without issue. I've set my env vars like this:
and I've also executed the following:
(Iceberg not related directly to this problem, just noting it). I also get the error:
I know my repro isn't using dbt-duckdb, but I'm also interested in this use case with dbt-duckdb (was just testing with SQL to verify behavior outside of dbt-duckdb). |
Ah appreciate that @NatElkins -- I wonder if it works if you use the |
@jwills It doesn't seem to work, although I may be doing something wrong. I have the creds defined in my ~/.aws/credentials file. import duckdb
from fsspec import filesystem
duckdb.register_filesystem(filesystem('s3', anon=False))
duckdb.connect("s3://bucket/path/to/test.duckdb'")
r1 = duckdb.sql("select * from test")
print(r1) The error I get is:
|
Yep, right there with you-- I cannot figure out how to get this to work right now. 😞 |
I stumbled across this thread when searching for the same issue and I managed to make this working using the Secret provider system (see the S3 API Support Page). The issue seems to be to set credentials using statements like On the 0.10.3 version, when creating a secret like : INSTALL httpfs;
LOAD httpfs;
CREATE SECRET secret1 (
TYPE S3,
ENDPOINT '***',
KEY_ID '****',
SECRET '****',
REGION '****'
); then performing the "attach" statement : ATTACH 's3://path/to/dbfile'
AS db (READ_ONLY) it worked perfectly |
Chiming in to say this is still a problem on 1.0.0 python release. |
Any workaround on this? for dagster with duck the workaround was to use boto3 to set the session manually. Is there any way to make it work? This is my profiles.yml
and this is my source:
The error I'm getting is
|
Oh interesting— can you point me at the Dagster workaround and I will see if I can implement it here? |
Referring to the documentation when I am trying to connect to my duckdb database by attaching it
I get the following error:
The text was updated successfully, but these errors were encountered: