diff --git a/gcloud_connectors/bigquery.py b/gcloud_connectors/bigquery.py index cd27067..af2369a 100644 --- a/gcloud_connectors/bigquery.py +++ b/gcloud_connectors/bigquery.py @@ -158,10 +158,16 @@ def pd_execute_chunked(self, query, progress_bar_type=None, bqstorage_enabled=Fa while query_job.done() is not True: self.logger.info("waiting for job completion") + try: + query_job.result() # Waits for table load to complete. + + except: + print(query_job.exception()) + destination = query_job.destination try: destination = self.service.get_table(destination) - except exceptions.NotFound: + except (exceptions.NotFound, AttributeError): if sleep_time: time.sleep(sleep_time) destination = self.service.get_table(destination) diff --git a/setup.py b/setup.py index 70c7c7c..59c944c 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ def get_requirements(*requirements_file): setup(name='gcloud-connectors', - version='0.1.98b3', + version='0.1.98b4', url='https://github.com/pualien/py-gcloud-connector', # download_url='https://github.com/pualien/py-gcloud-connectors/archive/0.1.23.tar.gz', license='MIT',