Skip to content

Commit 84ce2f3

Browse files
Merge pull request #53 from fivetran/feature/google-ads-api-default
feature/google-ads-api-default
2 parents 056017e + d1e9d7e commit 84ce2f3

File tree

8 files changed

+24
-16
lines changed

8 files changed

+24
-16
lines changed

.circleci/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
dbt seed --target postgres --full-refresh
3333
dbt run --target postgres --full-refresh
3434
dbt test --target postgres
35-
dbt run --target postgres --full-refresh --vars '{api_source: google_ads}'
35+
dbt run --target postgres --full-refresh --vars '{api_source: adwords}'
3636
dbt test --target postgres
3737
- run:
3838
name: "Run Tests - Spark"
@@ -44,7 +44,7 @@ jobs:
4444
dbt seed --target spark --full-refresh
4545
dbt run --target spark --full-refresh
4646
dbt test --target spark
47-
dbt run --target spark --full-refresh --vars '{api_source: google_ads}'
47+
dbt run --target spark --full-refresh --vars '{api_source: adwords}'
4848
dbt test --target spark
4949
- run:
5050
name: "Run Tests - Redshift"
@@ -56,7 +56,7 @@ jobs:
5656
dbt seed --target redshift --full-refresh
5757
dbt run --target redshift --full-refresh
5858
dbt test --target redshift
59-
dbt run --target redshift --full-refresh --vars '{api_source: google_ads}'
59+
dbt run --target redshift --full-refresh --vars '{api_source: adwords}'
6060
dbt test --target redshift
6161
- run:
6262
name: "Run Tests - Snowflake"
@@ -68,7 +68,7 @@ jobs:
6868
dbt seed --target snowflake --full-refresh
6969
dbt run --target snowflake --full-refresh
7070
dbt test --target snowflake
71-
dbt run --target snowflake --full-refresh --vars '{api_source: google_ads}'
71+
dbt run --target snowflake --full-refresh --vars '{api_source: adwords}'
7272
dbt test --target snowflake
7373
- run:
7474
name: "Run Tests - BigQuery"
@@ -83,5 +83,5 @@ jobs:
8383
dbt seed --target bigquery --full-refresh
8484
dbt run --target bigquery --full-refresh
8585
dbt test --target bigquery
86-
dbt run --target bigquery --full-refresh --vars '{api_source: google_ads}'
86+
dbt run --target bigquery --full-refresh --vars '{api_source: adwords}'
8787
dbt test --target bigquery

.github/pull_request_template.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
Pull Request
21
**Are you a current Fivetran customer?**
32
<!--- Please tell us your name, title and company -->
43

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# dbt_ad_reporting v0.8.0
2+
## 🚨 Breaking Changes 🚨
3+
- 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))
4+
- 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.
5+
6+
## Updates
7+
- The `ad_reporting` final model is now materialized in a schema `<target_schema>_ad_reporting` by default. This may be overwritten if desired. ([#53](https://github.com/fivetran/dbt_ad_reporting/pull/53))
18
# dbt_ad_reporting v0.7.0
29
## 🚨 Breaking Changes 🚨
310
- 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.

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Include in your `packages.yml`
3030
```yaml
3131
packages:
3232
- package: fivetran/ad_reporting
33-
version: [">=0.7.0", "<0.8.0"]
33+
version: [">=0.8.0", "<0.9.0"]
3434

3535
```
3636

@@ -114,10 +114,9 @@ models:
114114
enabled: false
115115
```
116116
### Google Ads and Adwords API Configuration
117-
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.
117+
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`.
118118

119-
#### Google Ads API
120-
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:
119+
> **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.
121120

122121
```yml
123122
# dbt_project.yml
@@ -126,10 +125,10 @@ If your Google Ads connector is setup using the Google Ads API then you will nee
126125
config-version: 2
127126
128127
vars:
129-
api_source: google_ads ## adwords by default and is case sensitive!
128+
api_source: google_ads ## google_ads by default, but may be changed to 'adwords' if using a previous version of the connector.
130129
```
131130
#### Adwords API
132-
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.
131+
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.
133132

134133
### Data Location
135134

@@ -172,6 +171,8 @@ By default this package will build all models in your <target_schema>. This beh
172171
173172
...
174173
models:
174+
ad_reporting:
175+
+schema: ad_reporting
175176
pinterest:
176177
+schema: pinterest
177178
pinterest_source:

dbt_project.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'ad_reporting'
2-
version: '0.7.0'
2+
version: '0.8.0'
33
config-version: 2
44

55
require-dbt-version: [">=1.0.0", "<2.0.0"]
@@ -16,6 +16,7 @@ vars:
1616

1717
models:
1818
ad_reporting:
19+
+schema: ad_reporting
1920
+materialized: view
2021

2122
pinterest:

integration_tests/dbt_project.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'ad_reporting_integration_tests'
2-
version: '0.7.0'
2+
version: '0.8.0'
33
profile: 'integration_tests'
44
config-version: 2
55

models/stg_google_ads.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ with base as (
1111
'Google Ads' as platform,
1212
cast(date_day as date) as date_day,
1313
account_name,
14-
{% 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 %} ,
14+
{% 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 %} ,
1515
campaign_name,
1616
cast(campaign_id as {{ dbt_utils.type_string() }}) as campaign_id,
1717
ad_group_name,

packages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ packages:
99
version: [">=0.4.0", "<0.5.0"]
1010

1111
- package: fivetran/google_ads
12-
version: [">=0.6.0", "<0.7.0"]
12+
version: [">=0.7.0", "<0.8.0"]
1313

1414
- package: fivetran/tiktok_ads
1515
version: [">=0.1.0", "<0.2.0"]

0 commit comments

Comments
 (0)