From 65d7fbf704495223d6a5b7c8a0538667bcddf36e Mon Sep 17 00:00:00 2001 From: Aaron Toth Date: Tue, 4 Nov 2014 11:14:11 -0500 Subject: [PATCH 1/2] BUG: The 'jobComplete' key may be present but False in the query results. Fixes an error when looking for 'totalRows' on a large dataset which is not finished in between two subsequent checks. --- pandas/io/gbq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'], From 70499b3be0c392b156f66a0e06ddbdd1e53368d7 Mon Sep 17 00:00:00 2001 From: Aaron Toth Date: Wed, 5 Nov 2014 09:39:14 -0500 Subject: [PATCH 2/2] DOC: Added line to what's new for an bug in the BigQuery reader (GH8728) --- doc/source/whatsnew/v0.16.0.txt | 2 ++ 1 file changed, 2 insertions(+) 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`)