Skip to content
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

Cannot specify Athena workgroup when using sqlalchemy #466

Closed
milescrawford opened this issue Aug 15, 2023 · 2 comments
Closed

Cannot specify Athena workgroup when using sqlalchemy #466

milescrawford opened this issue Aug 15, 2023 · 2 comments

Comments

@milescrawford
Copy link

When using the library directly, you can provide a work_group argument to the call to connect.

However, I do not see any way to specify which work group is to be used when using pyathena with sqlalchemy - there doesn't appear to be a way to include a workgroup in the connection string.

Is there a way to work around this, or should some explicit means of setting workgroup for sqlalchemy be added?

Thank you!

@laughingman7743
Copy link
Owner

laughingman7743 commented Aug 16, 2023

In SQLAlchemy, you should be able to specify the workgroup name as a parameter in the connection string as follows.

awsathena+rest://athena.region_name.amazonaws.com:443/schema_name?s3_staging_dir=s3_staging_dir&work_group=work_group_name

@milescrawford
Copy link
Author

Oh of course. Sorry, I somehow saw the list of dialect options below and thought that was the available set for the connection string. But of course all the parameters to the connect method are supported. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants