Skip to content

Commit 3ed08a7

Browse files
arsenlosenkolazebnyioctavia-squidington-iii
authored andcommitted
Source Google Ads: add TypeTransformer to force proper type casting (#19208)
* Source Google Ads: add TypeTransformer to force proper type casting * Update changelog * Speciy TypeTransformer only to Campaigns stream * auto-bump connector version Co-authored-by: Serhii Lazebnyi <[email protected]> Co-authored-by: Octavia Squidington III <[email protected]>
1 parent b6cb455 commit 3ed08a7

File tree

5 files changed

+6
-3
lines changed

5 files changed

+6
-3
lines changed

airbyte-config/init/src/main/resources/seed/source_definitions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@
499499
- name: Google Ads
500500
sourceDefinitionId: 253487c0-2246-43ba-a21f-5116b20a2c50
501501
dockerRepository: airbyte/source-google-ads
502-
dockerImageTag: 0.2.3
502+
dockerImageTag: 0.2.4
503503
documentationUrl: https://docs.airbyte.com/integrations/sources/google-ads
504504
icon: google-adwords.svg
505505
sourceType: api

airbyte-config/init/src/main/resources/seed/source_specs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4548,7 +4548,7 @@
45484548
supportsNormalization: false
45494549
supportsDBT: false
45504550
supported_destination_sync_modes: []
4551-
- dockerImage: "airbyte/source-google-ads:0.2.3"
4551+
- dockerImage: "airbyte/source-google-ads:0.2.4"
45524552
spec:
45534553
documentationUrl: "https://docs.airbyte.com/integrations/sources/google-ads"
45544554
connectionSpecification:

airbyte-integrations/connectors/source-google-ads/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ COPY main.py ./
1313

1414
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]
1515

16-
LABEL io.airbyte.version=0.2.3
16+
LABEL io.airbyte.version=0.2.4
1717
LABEL io.airbyte.name=airbyte/source-google-ads

airbyte-integrations/connectors/source-google-ads/source_google_ads/streams.py

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import pendulum
99
from airbyte_cdk.models import SyncMode
1010
from airbyte_cdk.sources.streams import IncrementalMixin, Stream
11+
from airbyte_cdk.sources.utils.transform import TransformConfig, TypeTransformer
1112
from google.ads.googleads.errors import GoogleAdsException
1213
from google.ads.googleads.v11.errors.types.authorization_error import AuthorizationErrorEnum
1314
from google.ads.googleads.v11.errors.types.request_error import RequestErrorEnum
@@ -256,6 +257,7 @@ class Campaigns(IncrementalGoogleAdsStream):
256257
Campaigns stream: https://developers.google.com/google-ads/api/fields/v11/campaign
257258
"""
258259

260+
transformer = TypeTransformer(TransformConfig.DefaultSchemaNormalization)
259261
primary_key = ["campaign.id", "segments.date"]
260262

261263

docs/integrations/sources/google-ads.md

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan
124124

125125
| Version | Date | Pull Request | Subject |
126126
|:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|
127+
| `0.2.4` | 2022-11-09 | [19208](https://github.com/airbytehq/airbyte/pull/19208) | Add TypeTransofrmer to Campaings stream to force proper type casting |
127128
| `0.2.3` | 2022-10-17 | [18069](https://github.com/airbytehq/airbyte/pull/18069) | Add `segments.hour`, `metrics.ctr`, `metrics.conversions` and `metrics.conversions_values` fields to `campaigns` report stream |
128129
| `0.2.2` | 2022-10-21 | [17412](https://github.com/airbytehq/airbyte/pull/17412) | Release with CDK >= 0.2.2 |
129130
| `0.2.1` | 2022-09-29 | [17412](https://github.com/airbytehq/airbyte/pull/17412) | Always use latest CDK version |

0 commit comments

Comments
 (0)