Aws-data-wrangler: KeyError: 'StatementType' with Athena using max_cache_seconds

Created on 15 Jul 2020  路  8Comments  路  Source: awslabs/aws-data-wrangler

Describe the bug
I'm trying to execute a query against AWS Athena -

pricing_table = awswrangler.athena.read_sql_query(
        (
            "SELECT * FROM historical_lane_pricing "
            "WHERE postal_code in ({}) "
            "AND company_id = '{}'"
        ).format(
            ', '.join(["'{}'".format(stop_zip) for stop_zip in stops_zips]),
            pricing_request.company_id,
        ),
        database = "default",
        max_cache_seconds=900,
        max_cache_query_inspections=500
    )

Which is producing the falling terror -

KeyError: 'StatementType'

To Reproduce
This doesn't happen against master branch, only with PyPI installed v 1.6.3

Run a query against AWS Athena using the read_sql_query method and setting a value > 0 for the max_cache_seconds argument.

Minor Release Ready to release bug

All 8 comments

Thank you for reporting it @zacharycarter!

Could you please check your boto3 and botocore versions in both situation (master vs pypi)?

In the meanwhile I will try to replicate it here.

Fix done on PR #325. Release expected for version 1.7.0 next week.

@zacharycarter, feel free to test our dev branch before the official release:

pip install git+https://github.com/awslabs/aws-data-wrangler.git@dev

Hi @igorborgest - please accept my apologies for not getting back to you on boto3 / botocore versions, and thank you for reproducing and addressing this so quickly! We had a hackathon going on at work today so I was preoccupied with that.

I will test this tomorrow against the dev branch and confirm that everything is working for me.

@igorborgest just wanted to confirm I've tested against the dev branch and all looks good! Thanks again for the quick fix!

Awesome @zacharycarter, thank you for test it.

Released in 1.7.0!

Hi @zacharycarter !

It is totally off-topic, but we are stating a _"Who uses AWS Data Wrangler?"_ section. So feel free to add yourself if you want 馃槃 .

Was this page helpful?
0 / 5 - 0 ratings