Skip to content

Commit

Permalink
fix(ingest): bigquery - views in case more than 1 datasets with views (
Browse files Browse the repository at this point in the history
…#6995)

Co-authored-by: Tamas Nemeth <[email protected]>
  • Loading branch information
anshbansal and treff7es authored Jan 10, 2023
1 parent c82d4fb commit 2fbdd26
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1231,15 +1231,13 @@ def get_views_for_dataset(
project_id: str,
dataset_name: str,
) -> List[BigqueryView]:
views = self.db_views.get(project_id)
views = self.db_views.get(project_id, {}).get(dataset_name, [])

if not views:
return BigQueryDataDictionary.get_views_for_dataset(
conn, project_id, dataset_name, self.config.profiling.enabled
)

# Some schema may not have any table
return views.get(dataset_name, [])
return views

def get_columns_for_table(
self,
Expand Down

0 comments on commit 2fbdd26

Please sign in to comment.