Skip to content

Commit

Permalink
Merge pull request #113 from caraml-dev/add_uuid_to_staged_bq_table_name
Browse files Browse the repository at this point in the history
chore: Replace timestamp in staged bigquery table name with uuid
  • Loading branch information
khorshuheng authored Nov 21, 2023
2 parents 7e08128 + f5fc5cc commit 15f8bda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion caraml-store-sdk/python/feast/gcp/staging.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from google.cloud import bigquery
import pandas as pd
import uuid

from datetime import datetime, timedelta

Expand All @@ -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
Expand Down

0 comments on commit 15f8bda

Please sign in to comment.