diff --git a/parsons/google/google_bigquery.py b/parsons/google/google_bigquery.py index c4002b7997..900c9ebf21 100644 --- a/parsons/google/google_bigquery.py +++ b/parsons/google/google_bigquery.py @@ -315,6 +315,12 @@ def query_with_connection( if not return_values: return None + # This applies when running a SQL statement without any return value + # e.g. when creating a view or a table + # This does not apply when 0 rows are returned + if not cursor.description: + return None + final_table = self._fetch_query_results(cursor=cursor) return final_table