Skip to content

Commit

Permalink
Fix dry_run bug that was making to_bigquery hang indefinitely (feast-…
Browse files Browse the repository at this point in the history
…dev#1706)

Signed-off-by: Cody Lin <[email protected]>
Signed-off-by: CS <[email protected]>
  • Loading branch information
codyjlin authored and 8bit-pixies committed Jul 16, 2021
1 parent c047186 commit 697f054
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,17 @@ def to_bigquery(self, job_config: bigquery.QueryJobConfig = None) -> Optional[st

bq_job = self.client.query(self.query, job_config=job_config)

block_until_done(client=self.client, bq_job=bq_job)

if bq_job.exception():
raise bq_job.exception()

if job_config.dry_run:
print(
"This query will process {} bytes.".format(bq_job.total_bytes_processed)
)
return None

block_until_done(client=self.client, bq_job=bq_job)

if bq_job.exception():
raise bq_job.exception()

print(f"Done writing to '{job_config.destination}'.")
return str(job_config.destination)

Expand Down

0 comments on commit 697f054

Please sign in to comment.