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

User specified workgroup is not honored in athena.read_sql_query with unload_approach=True #1178

Closed
kopachev opened this issue Feb 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kopachev
Copy link

Describe the bug

workgroup argument of athena.read_sql_query() method is not propagated when the new approach unload_approach=True is used.

As a result code tried to use the default workgroup "primary" which isn't accessible for my IAM role hence call fails.

How to Reproduce

Create new Athena workgroup e.g. "large_scans" in your AWS account and pass it like this:

wr.athena.read_sql_query(
        sql=query,
        workgroup="large_scans",
        ctas_approach=False,
        unload_approach=True,  # Note that all works as expected when unload approach is not used

Put a breakpoint in awswrangler.athena._utils._start_query_execution function and notice value of workgroup argument is None

Expected behavior

The code should use the workgroup supplied in the call instead of the default "primary" one.

Your project

No response

Screenshots

No response

OS

Win

Python version

3.8.10

AWS DataWrangler version

2.14.0

Additional context

No response

@kopachev kopachev added the bug Something isn't working label Feb 17, 2022
@jaidisido jaidisido self-assigned this Feb 25, 2022
@jaidisido jaidisido added this to the 2.15.0 milestone Feb 25, 2022
@jaidisido
Copy link
Contributor

Thank you for raising this @kopachev. I have raised PR #1190 with a fix. It can be tested from the main branch:

pip uninstall awswrangler -y
pip install git+https:/awslabs/aws-data-wrangler.git@main

until it's available in the next release (2.15.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants