Skip to content

Commit

Permalink
🔧 more work on exc block
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Martinez committed Jun 16, 2024
1 parent b45c6cf commit 2dcbffb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions target_bigquery/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def create_table(
table in a single method call. It is idempotent and will not create
a new table if one already exists."""
try:
self._dataset = client.get_dataset(self.as_dataset(**kwargs["dataset"]))
dataset = client.get_dataset(self.as_dataset(**kwargs["dataset"]))
except NotFound:
dataset = client.create_dataset(self.as_dataset(**kwargs["dataset"]))
except (Conflict, Forbidden):
Expand All @@ -176,7 +176,7 @@ def create_table(
f"Location of existing dataset {dataset.dataset_id} ({dataset.location}) "
f"does not match specified location: {kwargs['dataset']['location']}"
)
else:
finally:
self._dataset = dataset
try:
self._table = client.get_table(self.as_ref())
Expand Down

0 comments on commit 2dcbffb

Please sign in to comment.