Skip to content

Commit a9dfa13

Browse files
[io] fix: ensure that Bigquery dataset exists before write
1 parent 015841a commit a9dfa13

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libs/garf_io/garf_io/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = '0.0.8'
15+
__version__ = '0.0.9'

libs/garf_io/garf_io/writers/bigquery_writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def write(self, report: garf_report.GarfReport, destination: str) -> str:
104104
report = self.format_for_write(report)
105105
schema = _define_schema(report)
106106
destination = formatter.format_extension(destination)
107+
_ = self.create_or_get_dataset()
107108
table = self._create_or_get_table(
108109
f'{self.dataset_id}.{destination}', schema
109110
)

0 commit comments

Comments
 (0)