From f5fc5cc3c1bdc4bbae13a8b46be77bbb19668416 Mon Sep 17 00:00:00 2001 From: ewezy Date: Tue, 21 Nov 2023 11:38:11 +0800 Subject: [PATCH] chore: Replace timestamp in staged bigquery table name with uuid --- caraml-store-sdk/python/feast/gcp/staging.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caraml-store-sdk/python/feast/gcp/staging.py b/caraml-store-sdk/python/feast/gcp/staging.py index caed9a6..6467056 100644 --- a/caraml-store-sdk/python/feast/gcp/staging.py +++ b/caraml-store-sdk/python/feast/gcp/staging.py @@ -1,5 +1,6 @@ from google.cloud import bigquery import pandas as pd +import uuid from datetime import datetime, timedelta @@ -18,7 +19,7 @@ def stage_entities_to_bq( bq_client: bigquery.Client = bigquery.Client() destination = bigquery.TableReference( bigquery.DatasetReference(project, dataset), - f"_entities_{datetime.now():%Y%m%d%H%M%s}", + f"_entities_{uuid.uuid4()}", ) # prevent casting ns -> ms exception inside pyarrow