-
Notifications
You must be signed in to change notification settings - Fork 175
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
[BUG] Autodetect AWS region during deltalake scan #3104
Changes from 5 commits
fa00aaf
b521de8
eb37286
8244162
5ed2b50
8facac9
ff3444f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from daft.daft import S3Config | ||
|
||
if TYPE_CHECKING: | ||
import boto3 | ||
|
||
|
||
def boto3_client_from_s3_config(service: str, s3_config: S3Config) -> "boto3.client": | ||
import boto3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have to amend our requirements to make boto3 a requirement when using deltalake then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Technically you can use it with only Azure which is why I decided not to list it as an explicit requirement. Thoughts on that? |
||
|
||
return boto3.client( | ||
service, | ||
region_name=s3_config.region_name, | ||
use_ssl=s3_config.use_ssl, | ||
verify=s3_config.verify_ssl, | ||
endpoint_url=s3_config.endpoint_url, | ||
aws_access_key_id=s3_config.key_id, | ||
aws_secret_access_key=s3_config.access_key, | ||
aws_session_token=s3_config.session_token, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boto3 superclass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, at least log if we're going to move ahead silently