Skip to content

Commit ea9f5fc

Browse files
[executors] fix: avoid dataset conflicts in bq_executor
1 parent 0bc9e27 commit ea9f5fc

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libs/executors/garf_executors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def setup_executor(
5757
'ApiExecutionContext',
5858
]
5959

60-
__version__ = '0.1.5'
60+
__version__ = '0.1.6'

libs/executors/garf_executors/bq_executor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
from __future__ import annotations
1717

18+
import contextlib
1819
import os
1920

2021
try:
@@ -139,8 +140,9 @@ def create_datasets(self, macros: dict | None) -> None:
139140
except google_cloud_exceptions.NotFound:
140141
bq_dataset = bigquery.Dataset(dataset_id)
141142
bq_dataset.location = self.location
142-
self.client.create_dataset(bq_dataset, timeout=30)
143-
logger.info('Created new dataset %s', dataset_id)
143+
with contextlib.suppress(google_cloud_exceptions.Conflict):
144+
self.client.create_dataset(bq_dataset, timeout=30)
145+
logger.info('Created new dataset %s', dataset_id)
144146

145147

146148
def extract_datasets(macros: dict | None) -> list[str]:

0 commit comments

Comments
 (0)