Skip to content

Fetching results does not work with Athena managed query result storage #664

@pnorman

Description

@pnorman

Athena has a new option to manage the storage for your queries. This doesn't appear to work with pyathena

Image

When I am using a workgroup with this set, I always get an empty result set for any query
e.g.

@app.command()
def test():
    with pyathena.connect(region_name="eu-north-1",
                          cursor_class=pyathena.pandas.cursor.PandasCursor,
                          work_group="primary") as conn:
        with conn.cursor() as cursor:
            cursor.execute("SELECT 1")
            print(cursor.fetchall())

gives a result of

AWS_PROFILE=osm-service-logs uv run ofastlylog test
[]

When I switch to Customer managed storage I get

AWS_PROFILE=osm-service-logs uv run ofastlylog test
[(np.int64(1),)]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions