From 3d729c4e842b5f038106d10845b35eef457b2564 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Wed, 15 Jun 2022 10:54:22 -0500 Subject: [PATCH 1/4] feature/google-ads-api-default --- .circleci/config.yml | 10 +++++----- .github/pull_request_template.md | 1 - CHANGELOG.md | 4 ++++ README.md | 13 +++++++------ dbt_project.yml | 3 ++- integration_tests/dbt_project.yml | 2 +- models/stg_google_ads.sql | 2 +- packages.yml | 8 ++++++-- 8 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 00379fe..121be5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,7 +32,7 @@ jobs: dbt seed --target postgres --full-refresh dbt run --target postgres --full-refresh dbt test --target postgres - dbt run --target postgres --full-refresh --vars '{api_source: google_ads}' + dbt run --target postgres --full-refresh --vars '{api_source: adwords}' dbt test --target postgres - run: name: "Run Tests - Spark" @@ -44,7 +44,7 @@ jobs: dbt seed --target spark --full-refresh dbt run --target spark --full-refresh dbt test --target spark - dbt run --target spark --full-refresh --vars '{api_source: google_ads}' + dbt run --target spark --full-refresh --vars '{api_source: adwords}' dbt test --target spark - run: name: "Run Tests - Redshift" @@ -56,7 +56,7 @@ jobs: dbt seed --target redshift --full-refresh dbt run --target redshift --full-refresh dbt test --target redshift - dbt run --target redshift --full-refresh --vars '{api_source: google_ads}' + dbt run --target redshift --full-refresh --vars '{api_source: adwords}' dbt test --target redshift - run: name: "Run Tests - Snowflake" @@ -68,7 +68,7 @@ jobs: dbt seed --target snowflake --full-refresh dbt run --target snowflake --full-refresh dbt test --target snowflake - dbt run --target snowflake --full-refresh --vars '{api_source: google_ads}' + dbt run --target snowflake --full-refresh --vars '{api_source: adwords}' dbt test --target snowflake - run: name: "Run Tests - BigQuery" @@ -83,5 +83,5 @@ jobs: dbt seed --target bigquery --full-refresh dbt run --target bigquery --full-refresh dbt test --target bigquery - dbt run --target bigquery --full-refresh --vars '{api_source: google_ads}' + dbt run --target bigquery --full-refresh --vars '{api_source: adwords}' dbt test --target bigquery \ No newline at end of file diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 35f658d..f450926 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,4 +1,3 @@ -Pull Request **Are you a current Fivetran customer?** diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f3ceba..2413c32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# dbt_ad_reporting v0.8.0 +## 🚨 Breaking Changes 🚨 +- The `api_source` variable for the Google Ads package is now defaulted to `google_ads` as opposed to `adwords`. The Adwords API has since been depricated by Google and is now no longer the standard API for the Google Ads connector. Please ensure you are using a Google Ads API version of the Fivetran connector before upgrading this package. + - Please note, the `adwords` version of this package will be fully removed from the package in August of 2022. # dbt_ad_reporting v0.7.0 ## 🚨 Breaking Changes 🚨 - The Google Ads dependency has been updated to now reference the latest version of the `dbt_google_ads` package (v0.6.0). This version of the package incorporates new and modified tables within the `Google Ads API` version of the connector. For more information, refer to the relevant [dbt_google_ads](https://github.com/fivetran/dbt_google_ads_source/releases/tag/v0.6.0) and [dbt_google_ads_source](https://github.com/fivetran/dbt_google_ads/releases/tag/v0.6.0) v0.6.0 release notes. diff --git a/README.md b/README.md index 42fc9e2..beeaec2 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Include in your `packages.yml` ```yaml packages: - package: fivetran/ad_reporting - version: [">=0.7.0", "<0.8.0"] + version: [">=0.8.0", "<0.9.0"] ``` @@ -114,10 +114,9 @@ models: enabled: false ``` ### Google Ads and Adwords API Configuration -This package allows users to leverage either the Adwords API or the Google Ads API if you have enabled the Google Ads connector. You will be able to determine which API your Google Ads connector is using by navigating within your Fivetran UI to the `setup` tab -> `edit connection details` link -> and reference the `API configuration` used. You will want to refer to the respective configuration steps below based off the API used by your connector. +This package allows users to leverage either the Adwords API or the Google Ads API. You will be able to determine which API your connector is using by navigating within your Fivetran UI to the `setup` tab -> `edit connection details` link -> and reference the `API configuration` used. You will want to refer to the respective configuration steps below based off the API used by your connector. You may set the api type by using the below config in your root `dbt_project.yml`. -#### Google Ads API -If your Google Ads connector is setup using the Google Ads API then you will need to configure your `dbt_project.yml` with the below variable: +> **Note**: All new Google Ads Fivetran connectors will be setup with the Google Ads API. If you are unable to infer the API type based on the above steps, it is most likely that you are using the Google Ads API. Additionally, please be aware that the Adwords API version of the package will be sunset in August of 2022. ```yml # dbt_project.yml @@ -126,10 +125,10 @@ If your Google Ads connector is setup using the Google Ads API then you will nee config-version: 2 vars: - api_source: google_ads ## adwords by default and is case sensitive! + api_source: google_ads ## google_ads by default, but may be changed to 'adwords' if using a previous version of the connector. ``` #### Adwords API -If your Google Ads connector is setup using the Adwords API (default) then you will want to follow the steps outlined in the [dbt_google_ads](https://github.com/fivetran/dbt_google_ads#adwords-api-configuration) package for configuring your package to leverage the adwords API. +If your Google Ads connector is setup using the Adwords API (no longer default) then you will want to follow the steps outlined in the [dbt_google_ads](https://github.com/fivetran/dbt_google_ads#adwords-api-configuration) package for configuring your package to leverage the adwords API. ### Data Location @@ -172,6 +171,8 @@ By default this package will build all models in your . This beh ... models: + ad_reporting: + +schema: ad_reporting pinterest: +schema: pinterest pinterest_source: diff --git a/dbt_project.yml b/dbt_project.yml index e76b882..34164fc 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'ad_reporting' -version: '0.7.0' +version: '0.8.0' config-version: 2 require-dbt-version: [">=1.0.0", "<2.0.0"] @@ -16,6 +16,7 @@ vars: models: ad_reporting: + +schema: ad_reporting +materialized: view pinterest: diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index b3ba7b2..3406ef1 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'ad_reporting_integration_tests' -version: '0.7.0' +version: '0.8.0' profile: 'integration_tests' config-version: 2 diff --git a/models/stg_google_ads.sql b/models/stg_google_ads.sql index 349f5c9..3beb8e4 100644 --- a/models/stg_google_ads.sql +++ b/models/stg_google_ads.sql @@ -11,7 +11,7 @@ with base as ( 'Google Ads' as platform, cast(date_day as date) as date_day, account_name, - {% if var('api_source','adwords') == 'google_ads' %} cast(account_id as {{ dbt_utils.type_string() }}) as account_id {% else %} cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id {% endif %} , + {% if var('api_source','google_ads') == 'google_ads' %} cast(account_id as {{ dbt_utils.type_string() }}) as account_id {% else %} cast(external_customer_id as {{ dbt_utils.type_string() }}) as account_id {% endif %} , campaign_name, cast(campaign_id as {{ dbt_utils.type_string() }}) as campaign_id, ad_group_name, diff --git a/packages.yml b/packages.yml index 23dfbba..d5a7c7e 100644 --- a/packages.yml +++ b/packages.yml @@ -8,8 +8,12 @@ packages: - package: fivetran/linkedin version: [">=0.4.0", "<0.5.0"] -- package: fivetran/google_ads - version: [">=0.6.0", "<0.7.0"] +# - package: fivetran/google_ads +# version: [">=0.7.0", "<0.8.0"] +## TO SWITCH BEFORE MERGE +- git: https://github.com/fivetran/dbt_google_ads.git + revision: feature/google-ads-api-default + warn-unpinned: false - package: fivetran/tiktok_ads version: [">=0.1.0", "<0.2.0"] From 6ab0e1d667a368143c34772a5ae7e7ee68723225 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Wed, 15 Jun 2022 10:56:59 -0500 Subject: [PATCH 2/4] changelog update --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2413c32..a000f6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,10 @@ # dbt_ad_reporting v0.8.0 ## 🚨 Breaking Changes 🚨 -- The `api_source` variable for the Google Ads package is now defaulted to `google_ads` as opposed to `adwords`. The Adwords API has since been depricated by Google and is now no longer the standard API for the Google Ads connector. Please ensure you are using a Google Ads API version of the Fivetran connector before upgrading this package. +- The `api_source` variable for the Google Ads package is now defaulted to `google_ads` as opposed to `adwords`. The Adwords API has since been depricated by Google and is now no longer the standard API for the Google Ads connector. Please ensure you are using a Google Ads API version of the Fivetran connector before upgrading this package. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53)) - Please note, the `adwords` version of this package will be fully removed from the package in August of 2022. + +## Updates +- The `ad_reporting` final model is now materialized in a schema `_ad_reporting` by default. This may be overwritten if desired. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53)) # dbt_ad_reporting v0.7.0 ## 🚨 Breaking Changes 🚨 - The Google Ads dependency has been updated to now reference the latest version of the `dbt_google_ads` package (v0.6.0). This version of the package incorporates new and modified tables within the `Google Ads API` version of the connector. For more information, refer to the relevant [dbt_google_ads](https://github.com/fivetran/dbt_google_ads_source/releases/tag/v0.6.0) and [dbt_google_ads_source](https://github.com/fivetran/dbt_google_ads/releases/tag/v0.6.0) v0.6.0 release notes. From 54d490a011fabed32b426d492647716b103ac071 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Mon, 27 Jun 2022 16:47:06 -0500 Subject: [PATCH 3/4] review updates --- CHANGELOG.md | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a000f6a..3c1b868 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # dbt_ad_reporting v0.8.0 ## 🚨 Breaking Changes 🚨 -- The `api_source` variable for the Google Ads package is now defaulted to `google_ads` as opposed to `adwords`. The Adwords API has since been depricated by Google and is now no longer the standard API for the Google Ads connector. Please ensure you are using a Google Ads API version of the Fivetran connector before upgrading this package. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53)) - - Please note, the `adwords` version of this package will be fully removed from the package in August of 2022. +- The `api_source` variable for the Google Ads package is now defaulted to `google_ads` as opposed to `adwords`. The Adwords API has since been deprecated by Google and is now no longer the standard API for the Google Ads connector. Please ensure you are using a Google Ads API version of the Fivetran connector before upgrading this package. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53)) + - Please note, the `adwords` version of this package will be fully removed from the package in August of 2022. This means, models under `models/adwords_connector` will be removed in favor of `models/google_ads_connector` models. ## Updates - The `ad_reporting` final model is now materialized in a schema `_ad_reporting` by default. This may be overwritten if desired. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53)) diff --git a/README.md b/README.md index beeaec2..ae6f97b 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ models: ### Google Ads and Adwords API Configuration This package allows users to leverage either the Adwords API or the Google Ads API. You will be able to determine which API your connector is using by navigating within your Fivetran UI to the `setup` tab -> `edit connection details` link -> and reference the `API configuration` used. You will want to refer to the respective configuration steps below based off the API used by your connector. You may set the api type by using the below config in your root `dbt_project.yml`. -> **Note**: All new Google Ads Fivetran connectors will be setup with the Google Ads API. If you are unable to infer the API type based on the above steps, it is most likely that you are using the Google Ads API. Additionally, please be aware that the Adwords API version of the package will be sunset in August of 2022. +> **Note**: As of April, 2022 all Fivetran Google Ads connectors leverage the Google Ads API rather than Adwords. Additionally, please be aware that the Adwords API version of the package will be sunset in August of 2022. ```yml # dbt_project.yml From d1e9d7e798f44cca0a456db4b837d1a2bef060ab Mon Sep 17 00:00:00 2001 From: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> Date: Tue, 28 Jun 2022 12:53:41 -0500 Subject: [PATCH 4/4] Update packages.yml --- packages.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages.yml b/packages.yml index d5a7c7e..cb308e9 100644 --- a/packages.yml +++ b/packages.yml @@ -8,12 +8,8 @@ packages: - package: fivetran/linkedin version: [">=0.4.0", "<0.5.0"] -# - package: fivetran/google_ads -# version: [">=0.7.0", "<0.8.0"] -## TO SWITCH BEFORE MERGE -- git: https://github.com/fivetran/dbt_google_ads.git - revision: feature/google-ads-api-default - warn-unpinned: false +- package: fivetran/google_ads + version: [">=0.7.0", "<0.8.0"] - package: fivetran/tiktok_ads version: [">=0.1.0", "<0.2.0"]