Skip to content

Commit

Permalink
fix bug around dataset and table ids (#691)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-quix authored Dec 17, 2024
1 parent b3321ef commit d615f82
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions quixstreams/sinks/community/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@ def __init__(

super().__init__()
self.location = location
self.table_name = table_name

self.project_id = project_id

self.dataset_id = dataset_id
self.table_id = f"{self.dataset_id}.{self.table_name}"
self.dataset_id = f"{self.project_id}.{dataset_id}"
self.table_id = f"{self.dataset_id}.{table_name}"
self.ddl_timeout = ddl_timeout
self.insert_timeout = insert_timeout
self.retry = bigquery.DEFAULT_RETRY.with_timeout(timeout=retry_timeout)
Expand All @@ -128,6 +125,7 @@ def __init__(
kwargs["credentials"] = credentials

self._client = bigquery.Client(**kwargs)
logger.info("Successfully authenticated to BigQuery.")
if self.schema_auto_update:
# Initialize a table in BigQuery if it doesn't exist already
self._init_table()
Expand Down

0 comments on commit d615f82

Please sign in to comment.