Skip to content

Commit 2bbac4e

Browse files
committed
Changed the way it loads the client
1 parent 628d8b8 commit 2bbac4e

File tree

1 file changed

+3
-2
lines changed
  • airflow-cloud-composer-etl-feature-train/materializers

1 file changed

+3
-2
lines changed

airflow-cloud-composer-etl-feature-train/materializers/bq_dataset.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ def __init__(
3636
self.project = project
3737
self.dataset = dataset
3838
if project is None:
39+
# Split up the table_id to get the project
40+
self.project = table_id.split(".")[0]
3941
self.client = bigquery.Client()
40-
else:
41-
self.client = bigquery.Client(project=project)
42+
self.client = bigquery.Client(project=self.project)
4243
self.df = df
4344

4445
def read_data(self) -> pd.DataFrame:

0 commit comments

Comments
 (0)