Skip to content

Commit

Permalink
Update bigquery.py
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Nov 26, 2023
1 parent 874c1e3 commit 7d5009e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lea/clients/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ def list_tables(self):
FROM `region-{self.location.lower()}`.INFORMATION_SCHEMA.TABLE_STORAGE_BY_PROJECT
WHERE table_schema = '{self.dataset_name}'
"""
view = lea.views.GenericSQLView(
query=query, sqlglot_dialect=self.sqlglot_dialect
)
view = lea.views.GenericSQLView(query=query, sqlglot_dialect=self.sqlglot_dialect)
return self._load_sql_view(view)

def list_columns(self) -> pd.DataFrame:
Expand All @@ -136,9 +134,7 @@ def list_columns(self) -> pd.DataFrame:
data_type AS type
FROM {self.dataset_name}.INFORMATION_SCHEMA.COLUMNS
"""
view = lea.views.GenericSQLView(
query=query, sqlglot_dialect=self.sqlglot_dialect
)
view = lea.views.GenericSQLView(query=query, sqlglot_dialect=self.sqlglot_dialect)
columns = self._load_sql_view(view)
return columns

Expand Down

0 comments on commit 7d5009e

Please sign in to comment.