From 0dce9aa605b81863ccaa90948b91d5c018ac4092 Mon Sep 17 00:00:00 2001 From: mutt-santiago-stachuk Date: Thu, 13 Oct 2022 04:19:59 -0300 Subject: [PATCH 1/5] feat: add new fields to campaign stream --- .../source_google_ads/schemas/campaigns.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json index 329bf21a1ec1..248e565b302e 100644 --- a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json +++ b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json @@ -245,6 +245,15 @@ "metrics.clicks": { "type": ["null", "integer"] }, + "metrics.ctr": { + "type": ["null", "integer"] + }, + "metrics.conversions": { + "type": ["null", "integer"] + }, + "metrics.conversions_value": { + "type": ["null", "integer"] + }, "metrics.cost_micros": { "type": ["null", "integer"] }, @@ -260,6 +269,10 @@ "segments.date": { "type": ["null", "string"], "format": "date" + }, + "segments.hour": { + "type": ["null", "string"], + "format": "date" } } } From 539c20081841a7736b902db2eb29c0e9b0ddb210 Mon Sep 17 00:00:00 2001 From: mutt-santiago-stachuk Date: Mon, 17 Oct 2022 15:14:03 -0300 Subject: [PATCH 2/5] docs: updated docs and bumped Dockerfile version --- .../connectors/source-google-ads/BOOTSTRAP.md | 2 +- .../connectors/source-google-ads/Dockerfile | 2 +- docs/integrations/sources/google-ads.md | 27 ++++++++++--------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-ads/BOOTSTRAP.md b/airbyte-integrations/connectors/source-google-ads/BOOTSTRAP.md index 5fc2389eabc8..89c07e4750cb 100644 --- a/airbyte-integrations/connectors/source-google-ads/BOOTSTRAP.md +++ b/airbyte-integrations/connectors/source-google-ads/BOOTSTRAP.md @@ -9,7 +9,7 @@ The resources are listed [here](https://developers.google.com/google-ads/api/ref When querying data, there are three categories of information that can be fetched: - **Attributes**: These are properties of the various entities in the API e.g: the title or ID of an ad campaign. -- **Metrics**: metrics are statistics related to entities in the API. For example, the number of impressions for an ad or an ad campaign. All available metrics can be found [here](https://developers.google.com/google-ads/api/fields/v8/metrics). +- **Metrics**: metrics are statistics related to entities in the API. For example, the number of impressions for an ad or an ad campaign. All available metrics can be found [here](https://developers.google.com/google-ads/api/fields/v11/metrics). - **Segments**: These are ways to partition metrics returned in the query by particular attributes. For example, one could query for the number of impressions (views of an ad) by running SELECT metrics.impressions FROM campaigns which would return the number of impressions for each campaign e.g: 10k impressions. Or you could query for impressions segmented by device type e.g; SELECT metrics.impressions, segments.device FROM campaigns which would return the number of impressions broken down by device type e.g: 3k iOS and 7k Android. When summing the result across all segments, diff --git a/airbyte-integrations/connectors/source-google-ads/Dockerfile b/airbyte-integrations/connectors/source-google-ads/Dockerfile index ccb8d79694f3..977fe479843d 100644 --- a/airbyte-integrations/connectors/source-google-ads/Dockerfile +++ b/airbyte-integrations/connectors/source-google-ads/Dockerfile @@ -13,5 +13,5 @@ COPY main.py ./ ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.1 +LABEL io.airbyte.version=0.2.2 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 6acaa39a3d69..f54dd1d21151 100644 --- a/docs/integrations/sources/google-ads.md +++ b/docs/integrations/sources/google-ads.md @@ -78,33 +78,33 @@ The Google Ads source connector can sync the following tables. It can also sync ### Main Tables -- [accounts](https://developers.google.com/google-ads/api/fields/v9/customer) -- [ad_group_ads](https://developers.google.com/google-ads/api/fields/v9/ad_group_ad) -- [ad_group_ad_labels](https://developers.google.com/google-ads/api/fields/v9/ad_group_ad_label) -- [ad_groups](https://developers.google.com/google-ads/api/fields/v9/ad_group) -- [ad_group_labels](https://developers.google.com/google-ads/api/fields/v9/ad_group_label) -- [campaign_labels](https://developers.google.com/google-ads/api/fields/v9/campaign_label) -- [click_view](https://developers.google.com/google-ads/api/reference/rpc/v9/ClickView) -- [keyword](https://developers.google.com/google-ads/api/fields/v9/keyword_view) -- [geographic](https://developers.google.com/google-ads/api/fields/v9/geographic_view) +- [accounts](https://developers.google.com/google-ads/api/fields/v11/customer) +- [ad_group_ads](https://developers.google.com/google-ads/api/fields/v11/ad_group_ad) +- [ad_group_ad_labels](https://developers.google.com/google-ads/api/fields/v11/ad_group_ad_label) +- [ad_groups](https://developers.google.com/google-ads/api/fields/v11/ad_group) +- [ad_group_labels](https://developers.google.com/google-ads/api/fields/v11/ad_group_label) +- [campaign_labels](https://developers.google.com/google-ads/api/fields/v11/campaign_label) +- [click_view](https://developers.google.com/google-ads/api/reference/rpc/v11/ClickView) +- [keyword](https://developers.google.com/google-ads/api/fields/v11/keyword_view) +- [geographic](https://developers.google.com/google-ads/api/fields/v11/geographic_view) Note that `ad_groups`, `ad_group_ads`, and `campaigns` contain a `labels` field, which should be joined against their respective `*_labels` streams if you want to view the actual labels. For example, the `ad_groups` stream contains an `ad_group.labels` field, which you would join against the `ad_group_labels` stream's `label.resource_name` field. ### Report Tables -- [campaigns](https://developers.google.com/google-ads/api/fields/v9/campaign) +- [campaigns](https://developers.google.com/google-ads/api/fields/v11/campaign) - [account_performance_report](https://developers.google.com/google-ads/api/docs/migration/mapping#account_performance) - [ad_group_ad_report](https://developers.google.com/google-ads/api/docs/migration/mapping#ad_performance) - [display_keyword_report](https://developers.google.com/google-ads/api/docs/migration/mapping#display_keyword_performance) - [display_topics_report](https://developers.google.com/google-ads/api/docs/migration/mapping#display_topics_performance) - [shopping_performance_report](https://developers.google.com/google-ads/api/docs/migration/mapping#shopping_performance) -- [user_location_report](https://developers.google.com/google-ads/api/fields/v9/user_location_view) +- [user_location_report](https://developers.google.com/google-ads/api/fields/v11/user_location_view) :::note -Due to Google Ads API constraints, the `click_view` stream retrieves data one day at a time and can only retrieve data newer than 90 days ago. Also, [metrics](https://developers.google.com/google-ads/api/fields/v9/metrics) cannot be requested for a Google Ads Manager account. Report streams are only available when pulling data from a non-manager account. +Due to Google Ads API constraints, the `click_view` stream retrieves data one day at a time and can only retrieve data newer than 90 days ago. Also, [metrics](https://developers.google.com/google-ads/api/fields/v11/metrics) cannot be requested for a Google Ads Manager account. Report streams are only available when pulling data from a non-manager account. ::: -For incremental streams, data is synced up to the previous day using your Google Ads account time zone since Google Ads can filter data only by [date](https://developers.google.com/google-ads/api/fields/v9/ad_group_ad#segments.date) without time. Also, some reports cannot load data real-time due to Google Ads [limitations](https://support.google.com/google-ads/answer/2544985?hl=en). +For incremental streams, data is synced up to the previous day using your Google Ads account time zone since Google Ads can filter data only by [date](https://developers.google.com/google-ads/api/fields/v11/ad_group_ad#segments.date) without time. Also, some reports cannot load data real-time due to Google Ads [limitations](https://support.google.com/google-ads/answer/2544985?hl=en). ## Custom Query: Understanding Google Ads Query Language @@ -124,6 +124,7 @@ Due to a limitation in the Google Ads API which does not allow getting performan | Version | Date | Pull Request | Subject | |:---------|:-----------|:---------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------| +| `0.2.2` | 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 | | `0.2.1` | 2022-09-29 | [17412](https://github.com/airbytehq/airbyte/pull/17412) | Always use latest CDK version | | `0.2.0` | 2022-08-23 | [15858](https://github.com/airbytehq/airbyte/pull/15858) | Mark the `query` and `table_name` fields in `custom_queries` as required | | `0.1.44` | 2022-07-27 | [15084](https://github.com/airbytehq/airbyte/pull/15084) | Fix data type `ad_group_criterion.topic.path` in `display_topics_performance_report` and shifted `campaigns` to non-managers streams | From 245c6e212fae383d23f4f251e143e093fa9f73ea Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 21 Oct 2022 21:25:38 +0000 Subject: [PATCH 3/5] Update campaigns.json --- .../source_google_ads/schemas/campaigns.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json index 248e565b302e..99c9e0d1013a 100644 --- a/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json +++ b/airbyte-integrations/connectors/source-google-ads/source_google_ads/schemas/campaigns.json @@ -246,7 +246,7 @@ "type": ["null", "integer"] }, "metrics.ctr": { - "type": ["null", "integer"] + "type": ["null", "number"] }, "metrics.conversions": { "type": ["null", "integer"] @@ -271,8 +271,7 @@ "format": "date" }, "segments.hour": { - "type": ["null", "string"], - "format": "date" + "type": ["null", "number"] } } } From b7982f849a28ecf4f9ec87c9888a06a9634dcdc7 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Fri, 21 Oct 2022 21:27:28 +0000 Subject: [PATCH 4/5] Update Dockerfile --- airbyte-integrations/connectors/source-google-ads/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/source-google-ads/Dockerfile b/airbyte-integrations/connectors/source-google-ads/Dockerfile index 977fe479843d..04b924655c80 100644 --- a/airbyte-integrations/connectors/source-google-ads/Dockerfile +++ b/airbyte-integrations/connectors/source-google-ads/Dockerfile @@ -13,5 +13,5 @@ COPY main.py ./ ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.2.2 +LABEL io.airbyte.version=0.2.3 LABEL io.airbyte.name=airbyte/source-google-ads From 64b5a94bcf4853c87af5d064cc62da74c4025ce2 Mon Sep 17 00:00:00 2001 From: Octavia Squidington III Date: Sat, 22 Oct 2022 04:26:35 +0000 Subject: [PATCH 5/5] auto-bump connector version --- .../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 b8883ed27b28..8f6f1c0ffbfb 100644 --- a/airbyte-config/init/src/main/resources/seed/source_definitions.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_definitions.yaml @@ -392,7 +392,7 @@ - name: Google Ads sourceDefinitionId: 253487c0-2246-43ba-a21f-5116b20a2c50 dockerRepository: airbyte/source-google-ads - dockerImageTag: 0.2.2 + dockerImageTag: 0.2.3 documentationUrl: https://docs.airbyte.com/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 2d842b06fcab..cd2e2df845a3 100644 --- a/airbyte-config/init/src/main/resources/seed/source_specs.yaml +++ b/airbyte-config/init/src/main/resources/seed/source_specs.yaml @@ -3785,7 +3785,7 @@ supportsNormalization: false supportsDBT: false supported_destination_sync_modes: [] -- dockerImage: "airbyte/source-google-ads:0.2.2" +- dockerImage: "airbyte/source-google-ads:0.2.3" spec: documentationUrl: "https://docs.airbyte.com/integrations/sources/google-ads" connectionSpecification: