Skip to content

Commit

Permalink
fix seed load result
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Nov 7, 2024
1 parent a2db35b commit b8408c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dbt/adapters/bigquery/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,13 @@ def _load_table_from_file(
with open(file_path, "rb") as f:
job = client.load_table_from_file(f, table, rewind=True, job_config=config)

if not job.done(retry=self._retry.retry(fallback_timeout=fallback_timeout)):
response = job.result(retry=self._retry.retry(fallback_timeout=fallback_timeout))

if response.state != "DONE":
raise DbtRuntimeError("BigQuery Timeout Exceeded")

elif job.error_result:
message = "\n".join(error["message"].strip() for error in job.errors)
elif response.error_result:
message = "\n".join(error["message"].strip() for error in response.errors)
raise DbtRuntimeError(message)

@staticmethod
Expand Down

0 comments on commit b8408c2

Please sign in to comment.