From b7af4fb0a15a7be313bcb724fa1cea98ca2a122a Mon Sep 17 00:00:00 2001 From: auganbay Date: Wed, 2 Feb 2022 12:19:48 +0600 Subject: [PATCH 1/4] upgrade google-ads package version --- .../connectors/source-google-ads/setup.py | 2 +- .../source_google_ads/schemas/ad_group_ads.json | 12 ------------ .../source-google-ads/source_google_ads/source.py | 1 + 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-ads/setup.py b/airbyte-integrations/connectors/source-google-ads/setup.py index acdc9b1ffa71d..3a6f41fed0398 100644 --- a/airbyte-integrations/connectors/source-google-ads/setup.py +++ b/airbyte-integrations/connectors/source-google-ads/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup -MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "google-ads==13.0.0", "pendulum"] +MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1", "google-ads==14.1.0", "pendulum"] TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock"] diff --git a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/ad_group_ads.json b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/ad_group_ads.json index ae16e3f22245d..8abdda7972418 100644 --- a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/ad_group_ads.json +++ b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/ad_group_ads.json @@ -479,9 +479,6 @@ "type": "string" } }, - "ad_group_ad.ad.video_ad.bumper.companion_banner": { - "type": ["null", "string"] - }, "ad_group_ad.ad.video_ad.discovery.description1": { "type": ["null", "string"] }, @@ -497,15 +494,6 @@ "ad_group_ad.ad.video_ad.in_stream.action_headline": { "type": ["null", "string"] }, - "ad_group_ad.ad.video_ad.in_stream.companion_banner": { - "type": ["null", "string"] - }, - "ad_group_ad.ad.video_ad.media_file": { - "type": ["null", "string"] - }, - "ad_group_ad.ad.video_ad.non_skippable.companion_banner": { - "type": ["null", "string"] - }, "ad_group_ad.ad.video_ad.out_stream.description": { "type": ["null", "string"] }, diff --git a/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py b/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py index de9dfaea906b9..e0336ddf5457d 100644 --- a/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py +++ b/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py @@ -35,6 +35,7 @@ class SourceGoogleAds(AbstractSource): @staticmethod def get_credentials(config: Mapping[str, Any]) -> Mapping[str, Any]: credentials = config["credentials"] + credentials.update(use_proto_plus=True) # https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid if "login_customer_id" in config and config["login_customer_id"].strip(): From 6d6039162379b70e20b784cf9d642b50c8134ae1 Mon Sep 17 00:00:00 2001 From: auganbay Date: Fri, 4 Feb 2022 10:31:49 +0600 Subject: [PATCH 2/4] add comment about use_proto_plus --- .../connectors/source-google-ads/source_google_ads/source.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py b/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py index e0336ddf5457d..bad864845cf1e 100644 --- a/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py +++ b/airbyte-integrations/connectors/source-google-ads/source_google_ads/source.py @@ -35,6 +35,8 @@ class SourceGoogleAds(AbstractSource): @staticmethod def get_credentials(config: Mapping[str, Any]) -> Mapping[str, Any]: credentials = config["credentials"] + # use_proto_plus is set to True, because setting to False returned wrong value types, which breakes the backward compatibility. + # For more info read the related PR's description: https://github.com/airbytehq/airbyte/pull/9996 credentials.update(use_proto_plus=True) # https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid From 6ac6d0a4fe6e44756be5d5cf20a4995ea9860847 Mon Sep 17 00:00:00 2001 From: auganbay Date: Fri, 4 Feb 2022 10:46:22 +0600 Subject: [PATCH 3/4] bump version --- airbyte-integrations/connectors/source-google-ads/Dockerfile | 2 +- docs/integrations/sources/google-ads.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-google-ads/Dockerfile b/airbyte-integrations/connectors/source-google-ads/Dockerfile index d44d856362bcb..f52e6ebc54610 100644 --- a/airbyte-integrations/connectors/source-google-ads/Dockerfile +++ b/airbyte-integrations/connectors/source-google-ads/Dockerfile @@ -13,5 +13,5 @@ RUN pip install . ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.23 +LABEL io.airbyte.version=0.1.24 LABEL io.airbyte.name=airbyte/source-google-ads diff --git a/docs/integrations/sources/google-ads.md b/docs/integrations/sources/google-ads.md index 60f20238f1168..20fa41524427f 100644 --- a/docs/integrations/sources/google-ads.md +++ b/docs/integrations/sources/google-ads.md @@ -102,6 +102,7 @@ This source is constrained by whatever API limits are set for the Google Ads tha | Version | Date | Pull Request | Subject | | :--- | :--- | :--- | :--- | +| `0.1.24` | 2022-02-04 | [9996](https://github.com/airbytehq/airbyte/pull/9996) | Use Google Ads API version V9. | | `0.1.23` | 2022-01-25 | [8669](https://github.com/airbytehq/airbyte/pull/8669) | Add end date parameter in spec. | | `0.1.22` | 2022-01-24 | [9608](https://github.com/airbytehq/airbyte/pull/9608) | Reduce stream slice date range. | | `0.1.21` | 2021-12-28 | [9149](https://github.com/airbytehq/airbyte/pull/9149) | Update title and description | From ce4a8f6162d16eb36c2dec264489dc7b58692c0e Mon Sep 17 00:00:00 2001 From: auganbay Date: Fri, 4 Feb 2022 11:24:32 +0600 Subject: [PATCH 4/4] updated spec and def yaml --- .../init/src/main/resources/seed/source_definitions.yaml | 2 +- airbyte-config/init/src/main/resources/seed/source_specs.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml index 15e93f2b31a48..9f0bca1848e8d 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -245,7 +245,7 @@ - name: Google Ads sourceDefinitionId: 253487c0-2246-43ba-a21f-5116b20a2c50 dockerRepository: airbyte/source-google-ads - dockerImageTag: 0.1.23 + dockerImageTag: 0.1.24 documentationUrl: https://docs.airbyte.io/integrations/sources/google-ads icon: google-adwords.svg sourceType: api diff --git a/airbyte-config/init/src/main/resources/seed/source_specs.yaml b/airbyte-config/init/src/main/resources/seed/source_specs.yaml index fe2e26ec09171..453e9bc2d21e3 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -2308,7 +2308,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-google-ads:0.1.23" +- dockerImage: "airbyte/source-google-ads:0.1.24" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/google-ads" connectionSpecification: