Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libs/garf_io/garf_io/writers/bigquery_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from google.cloud import bigquery
except ImportError as e:
raise ImportError(
'Please install google-ads-api-report-fetcher with BigQuery support '
'- `pip install google-ads-api-report-fetcher[bq]`'
'Please install garf-io with BigQuery support '
'- `pip install garf-io[bq]`'
) from e

import datetime
Expand Down Expand Up @@ -171,7 +171,7 @@ def _define_schema(

def _get_result_types(
report: garf_report.GarfReport,
) -> dict[str, dict[str, parsers.GoogleAdsRowElement]]:
) -> dict[str, dict[str, parsers.ApiRowElement]]:
"""Maps each column of report to BigQuery field type and repeated status.

Fields types are inferred based on report results or results placeholder.
Expand All @@ -182,7 +182,7 @@ def _get_result_types(
Returns:
Mapping between each column of report and its field type.
"""
result_types: dict[str, dict[str, parsers.GoogleAdsRowElement]] = {}
result_types: dict[str, dict[str, parsers.ApiRowElement]] = {}
column_names = report.column_names
for row in report.results or report.results_placeholder:
if set(column_names) == set(result_types.keys()):
Expand All @@ -209,7 +209,7 @@ def _get_result_types(


def _get_bq_schema(
types: dict[str, dict[str, parsers.GoogleAdsRowElement]],
types: dict[str, dict[str, parsers.ApiRowElement]],
) -> list[bigquery.SchemaField]:
"""Converts report fields types to BigQuery schema fields.

Expand Down
4 changes: 2 additions & 2 deletions libs/garf_io/garf_io/writers/sheets_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import gspread
except ImportError as e:
raise ImportError(
'Please install google-ads-api-report-fetcher with sheets support - '
'`pip install google-ads-api-report-fetcher[sheet]`'
'Please install garf-io with sheets support - '
'`pip install garf-io[sheets]`'
) from e

import datetime
Expand Down
4 changes: 2 additions & 2 deletions libs/garf_io/garf_io/writers/sqldb_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import sqlalchemy
except ImportError as e:
raise ImportError(
'Please install google-ads-api-report-fetcher with sqlalchemy support '
'- `pip install google-ads-api-report-fetcher[sqlalchemy]`'
'Please install garf-io with sqlalchemy support '
'- `pip install garf-io[sqlalchemy]`'
) from e

import logging
Expand Down
Loading