Skip to content

Commit

Permalink
fix bigquery
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jul 7, 2022
1 parent dcfba45 commit 7fbc119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,13 @@ def to_remote_storage(self) -> List[str]:
)
extract_job.result()

storage_client = StorageClient(project=self.config.offline_store.project_id)
bucket: str
prefix: str
storage_client = StorageClient(project=self.client.project)
bucket, prefix = self._gcs_path[len("gs://") :].split("/", 1)
prefix = prefix.rsplit("/", 1)[0]
if prefix.startswith("/"):
prefix = prefix[1:]

blobs = storage_client.list_blobs(bucket, prefix=prefix)
results = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def test_historical_features(environment, universal_data_sources, full_feature_n
if job_from_df.supports_remote_storage_export():
files = job_from_df.to_remote_storage()
print(files)
assert len(files) > 0 # This should be way more detailed
assert len(files) > 0 # This test should be way more detailed

start_time = datetime.utcnow()
actual_df_from_df_entities = job_from_df.to_df()
Expand Down

0 comments on commit 7fbc119

Please sign in to comment.