Closed emanueledomingo closed 1 year ago
I have done writes to Minio from Rust before, can you try setting AWS_ENDPOINT_URL
rather than ENDPOINT_URL
?
Tried with
storage_options={
"AWS_ACCESS_KEY_ID": "TESTACCESSKEY12345",
"AWS_SECRET_ACCESS_KEY":"ABCSECRETKEY",
"AWS_REGION": "anctartica",
"AWS_ENDPOINT_URL": "localhost:9000"
}
Same result: thread '<unnamed>' panicked at 'not stream', https://file+.vscode-resource.vscode-cdn.net/root/.cargo/registry/src/github.com-1ecc6299db9ec823/object_store-0.5.5/src/aws/credential.rs:175:14
Assuming standard localstack tcp port 4566 the code should be:
write_deltalake(
's3://test-bucket/animals',
animals,
storage_options={
"AWS_ACCESS_KEY_ID": "TESTACCESSKEY12345",
"AWS_SECRET_ACCESS_KEY":"ABCSECRETKEY",
"AWS_REGION": "us-east-1",
"AWS_ENDPOINT_URL": "http://localhost:4566",
"AWS_STORAGE_ALLOW_HTTP": "TRUE"
}
)
Also, do not set region to a non-valid value (in your case anctartica) or you will run into the folloowing error:
INFO --- [ asgi_gw_8] localstack.request.aws : AWS s3.GetObject => 500 (InternalError)
ERROR --- [ asgi_gw_9] l.aws.handlers.logging : exception during call chain: 'anctartica' is not a valid AWS region name for s3
Using AWS_STORAGE_ALLOW_HTTP
works. Thanks for claryfing.
Could we add AWS_STORAGE_ALLOW_HTTP
to the documentation?
@adriangb feel free to make a PR
Environment
Delta-rs version: 1.64
Binding: Python
Environment: Python==3.10, deltalake==0.8.1, pyarrow==11.0.0
Bug
What happened:
What you expected to happen: table successfully written.
How to reproduce it: