Skip to content

Commit

Permalink
updating pd_execute_chunked
Browse files Browse the repository at this point in the history
  • Loading branch information
pualien committed Aug 27, 2024
1 parent e1caf82 commit 21bd310
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion gcloud_connectors/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 21bd310

Please sign in to comment.