Skip to content

Commit

Permalink
🐛 Source Google Analytics (Data API, a.k.a 4 (GA4) ) (#39916)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazarnov authored Jun 21, 2024
1 parent 99fc791 commit 6f48e7a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 3cc2eafd-84aa-4dca-93af-322d9dfeec1a
dockerImageTag: 2.4.5
dockerImageTag: 2.4.6
dockerRepository: airbyte/source-google-analytics-data-api
documentationUrl: https://docs.airbyte.com/integrations/sources/google-analytics-data-api
githubIssueLabel: source-google-analytics-data-api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = [ "poetry-core>=1.0.0",]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
version = "2.4.5"
version = "2.4.6"
name = "source-google-analytics-data-api"
description = "Source implementation for Google Analytics Data Api."
authors = [ "Airbyte <contact@airbyte.io>",]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ def default_date_ranges_start_date(self) -> str:
# set default date ranges start date to 2 years ago
return pendulum.now(tz="UTC").subtract(years=2).format("YYYY-MM-DD")

@property
def raise_exception_on_missing_stream(self) -> bool:
# reference issue: https://github.com/airbytehq/airbyte-internal-issues/issues/8315
# This has been added, because there is a risk of removing the `Custom Stream` from the `input configuration`,
# which brings the error about `missing stream` present in the CATALOG but not in the `input configuration`.
return False

def _validate_and_transform_start_date(self, start_date: str) -> datetime.date:
start_date = self.default_date_ranges_start_date if not start_date else start_date

Expand Down Expand Up @@ -568,7 +575,9 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
config["authenticator"] = self.get_authenticator(config)
return [stream for report in reports + config["custom_reports_array"] for stream in self.instantiate_report_streams(report, config)]

def instantiate_report_streams(self, report: dict, config: Mapping[str, Any], **extra_kwargs) -> GoogleAnalyticsDataApiBaseStream:
def instantiate_report_streams(
self, report: dict, config: Mapping[str, Any], **extra_kwargs
) -> Iterable[GoogleAnalyticsDataApiBaseStream]:
add_name_suffix = False
for property_id in config["property_ids"]:
yield self.instantiate_report_class(
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/google-analytics-data-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ The Google Analytics connector is subject to Google Analytics Data API quotas. P

| Version | Date | Pull Request | Subject |
|:--------|:-----------| :------------------------------------------------------- |:---------------------------------------------------------------------------------------|
| 2.4.6 | 2024-06-21 | [39916](https://github.com/airbytehq/airbyte/pull/39916) | Added ability to skip `missing stream` in the CATALOG |
| 2.4.5 | 2024-06-06 | [38884](https://github.com/airbytehq/airbyte/pull/38884) | Make lookback window configurable. |
| 2.4.4 | 2024-06-06 | [39209](https://github.com/airbytehq/airbyte/pull/39209) | [autopull] Upgrade base image to v1.2.2 |
| 2.4.3 | 2024-06-03 | [38865](https://github.com/airbytehq/airbyte/pull/38865) | Enforce unique property IDs |
Expand Down

0 comments on commit 6f48e7a

Please sign in to comment.