Skip to content

Commit

Permalink
Merge pull request #34 from fivetran/feature/v2_updates
Browse files Browse the repository at this point in the history
Feature/v2 updates
  • Loading branch information
fivetran-sheringuyen authored Sep 2, 2022
2 parents e261f7f + 15b9027 commit dae1cb3
Show file tree
Hide file tree
Showing 41 changed files with 1,128 additions and 1,010 deletions.
Binary file added .DS_Store
Binary file not shown.
37 changes: 21 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,9 @@ jobs:
dbt deps
dbt seed --target postgres --full-refresh
dbt run --target postgres --full-refresh
dbt run --target postgres --full-refresh --vars '{api_source: adwords}'
dbt test --target postgres
- run:
name: "Run Tests - Spark"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps
dbt seed --target spark --full-refresh
dbt run --target spark --full-refresh
dbt run --target spark --full-refresh --vars '{api_source: adwords}'
dbt test --target spark
dbt run --vars '{google_auto_tagging_enabled: true}' --target postgres --full-refresh
dbt test --target postgres
- run:
name: "Run Tests - Redshift"
command: |
Expand All @@ -53,7 +43,8 @@ jobs:
dbt deps
dbt seed --target redshift --full-refresh
dbt run --target redshift --full-refresh
dbt run --target redshift --full-refresh --vars '{api_source: adwords}'
dbt test --target redshift
dbt run --vars '{google_auto_tagging_enabled: true}' --target redshift --full-refresh
dbt test --target redshift
- run:
name: "Run Tests - Snowflake"
Expand All @@ -64,7 +55,8 @@ jobs:
dbt deps
dbt seed --target snowflake --full-refresh
dbt run --target snowflake --full-refresh
dbt run --target snowflake --full-refresh --vars '{api_source: adwords}'
dbt test --target snowflake
dbt run --vars '{google_auto_tagging_enabled: true}' --target snowflake --full-refresh
dbt test --target snowflake
- run:
name: "Run Tests - BigQuery"
Expand All @@ -78,5 +70,18 @@ jobs:
dbt deps
dbt seed --target bigquery --full-refresh
dbt run --target bigquery --full-refresh
dbt run --target bigquery --full-refresh --vars '{api_source: adwords}'
dbt test --target bigquery
dbt test --target bigquery
dbt run --vars '{google_auto_tagging_enabled: true}' --target bigquery --full-refresh
dbt test --target bigquery
- run:
name: "Run Tests - Spark"
command: |
. venv/bin/activate
echo `pwd`
cd integration_tests
dbt deps
dbt seed --target spark --full-refresh
dbt run --target spark --full-refresh
dbt test --target spark
dbt run --vars '{google_auto_tagging_enabled: true}' --target spark --full-refresh
dbt test --target spark
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
# dbt_google_ads v0.8.0
## 🚨 Breaking Changes 🚨
- The `adwords` api version of the package has been fully removed. As the Fivetran Google Ads connector now requires the Google Ads API, this functionality is no longer used. ([#34](https://github.com/fivetran/dbt_google_ads/pull/34))
- Removal of the `google_ads__ad_adapter` model. ([#34](https://github.com/fivetran/dbt_google_ads/pull/34))
- Major updates have also been applied to the [dbt_google_ads_source](https://github.com/fivetran/dbt_google_ads_source) package which is a dependency of this package. Please refer to the [v0.8.0](https://github.com/fivetran/dbt_google_ads_source/releases/tag/v0.8.0) release notes for more details before upgrading your package.
- The declaration of passthrough variables within your root `dbt_project.yml` has changed. To allow for more flexibility and better tracking of passthrough columns, you will now want to define passthrough metrics in the following format:
> This applies to all passthrough metrics within the `dbt_google_ads` package and not just the `google_ads__ad_stats_passthrough_metrics` example.
```yml
vars:
google_ads__ad_stats_passthrough_metrics:
- name: "my_field_to_include" # Required: Name of the field within the source.
alias: "field_alias" # Optional: If you wish to alias the field within the staging model.
```
## 🎉 Feature Enhancements 🎉
- Addition of the following new end models. These models were added to provide further flexibility and ensure greater accuracy of your Google Ads reporting. Additionally, these new end models will be leveraged in the respective downstream [dbt_ad_reporting](https://github.com/fivetran/dbt_ad_reporting) models.
- `google_ads__account_report`
- Each record in this table represents the daily performance at the account level.
- `google_ads__campaign_report`
- Each record in this table represents the daily performance of a campaign at the campaign/advertising_channel/advertising_channel_subtype level.
- `google_ads__ad_group_report`
- Each record in this table represents the daily performance at the ad group level.
- `google_ads__keyword_report`
- Each record in this table represents the daily performance at the ad group level for keywords.
- `google_ads__ad_report`
- Each record in this table represents the daily performance at the ad level.
- `google_ads__url_report`
- Each record in this table represents the daily performance of URLs at the ad level.

- Added testing for each end model to ensure granularity and accuracy of the modeled data. ([#34](https://github.com/fivetran/dbt_google_ads/pull/34))
- README updates for easier navigation and use of the package. ([#34](https://github.com/fivetran/dbt_google_ads/pull/34))
- Inclusion of additional passthrough metrics within the respective end state models detailed above: ([#34](https://github.com/fivetran/dbt_google_ads/pull/34))
- `google_ads__ad_group_stats_passthrough_metrics`
- `google_ads__campaign_stats_passthrough_metrics`
- `google_ads__keyword_stats_passthrough_metrics`
- `google_ads__account_stats_passthrough_metrics`

## Contributors
- [@bnealdefero](https://github.com/bnealdefero) ([#20](https://github.com/fivetran/dbt_google_ads/pull/20))
# dbt_google_ads v0.7.0
## 🚨 Breaking Changes 🚨
- The `api_source` variable 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. ([#32](https://github.com/fivetran/dbt_google_ads/pull/32))
Expand Down
12 changes: 12 additions & 0 deletions DECISIONLOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Decision Log
## Ads Associated with Multiple Ad Groups
It was discovered within the `google_ads.ads_stats` source table that a single Ad can be associated with multiple ad groups on any given day. Because of this, it was determined that the `is_most_recent_record` logic within the `stg_google_ads__ad_history` model needed to account for the `ad_group_id` as well as the individual `ad_id`. As a result, the most recent record of an ad could possibly contain a unique combination of the `ad_id` and the `ad_group_id`.

The final `google_ads__url_report` and `google_ads__ad_report` models also take this into account and include an addition join condition between the `stg_google__ad_stats` and `stg_google__ad_history` models to account for the varying grain of the ad -> ad group relationship within the two tables. This additional join condition ensures the final models are accurately capturing **all** metrics for the ads that are associated with multiple ad groups.

This logic was only applied to the `google_ads__url_report` and `google_ads__ad_report` models as it was discovered this relationship was unique to ads and ad groups. If you experience this relationship among any of the other ad hierarchies, please open and [issue](https://github.com/fivetran/dbt_google_ads/issues/new?assignees=&labels=bug%2Ctriage&template=bug-report.yml&title=%5BBug%5D+%3Ctitle%3E) and we can continue the discussion!

## UTM Report Filtering
This package contains a `google_ads__url_report` which provides daily metrics for your utm compatible ads. It is important to note that not all Ads within Google's `ad_stats` report do not leverage utm parameters. Therefore, this package takes an opinionated approach to filter out any records that do not contain utm parameters or leverage a url within the ad.

If you would like to leverage a report that contains all ads and their daily metrics, I would suggest you leverage the `google_ads__ad_report` which does not apply any filtering.
Loading

0 comments on commit dae1cb3

Please sign in to comment.