diff --git a/doc/source/whatsnew/v0.16.0.txt b/doc/source/whatsnew/v0.16.0.txt index 18c55e38ab7af..be785d8cdb97e 100644 --- a/doc/source/whatsnew/v0.16.0.txt +++ b/doc/source/whatsnew/v0.16.0.txt @@ -197,3 +197,5 @@ Bug Fixes - Fixed issue in the ``xlsxwriter`` engine where it added a default 'General' format to cells if no other format wass applied. This prevented other row or column formatting being applied. (:issue:`9167`) - Fixes issue with ``index_col=False`` when ``usecols`` is also specified in ``read_csv``. (:issue:`9082`) - Bug where ``wide_to_long`` would modify the input stubnames list (:issue:`9204`) + +- Bug in the Google BigQuery reader where the 'jobComplete' key may be present but False in the query results (:issue:`8728`) diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index 572a8be5c65e8..5b4f37098a8bf 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -185,7 +185,7 @@ def run_query(self, query): job_reference = query_reply['jobReference'] - while(not 'jobComplete' in query_reply): + while(not query_reply.get('jobComplete', False)): print('Job not yet complete...') query_reply = job_collection.getQueryResults( projectId=job_reference['projectId'],