Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/budget association issue 21 #23

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
- `dbt.current_timestamp_in_utc_backcompat`
- `packages.yml` has been updated to reflect new default `fivetran/fivetran_utils` version, previously `[">=0.3.0", "<0.4.0"]` now `[">=0.4.0", "<0.5.0"]`.

[PR #23](https://github.com/fivetran/dbt_microsoft_ads_source/pull/23) includes the following updates:
- Added `budget_association_status` into the `stg_microsoft_ads__campaign_daily_report` table in order to account for campaign budgets that end midday. Including `budget_association_status` as another grain to test by, will reduce tests failing due to non-uniqueness of rows.

## Contributors
- @MaximeLagresle - Thank you for bringing up [this issue](https://github.com/fivetran/dbt_microsoft_ads_source/issues/21) in office hours!

# dbt_microsoft_ads_source v0.6.0

## 🚨 Breaking Changes 🚨
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

5,262 changes: 2,631 additions & 2,631 deletions integration_tests/seeds/microsoft_ads_campaign_performance_daily_report_data.csv

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion macros/get_campaign_daily_report_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{"name": "impressions", "datatype": dbt.type_int()},
{"name": "network", "datatype": dbt.type_string()},
{"name": "spend", "datatype": dbt.type_float()},
{"name": "top_vs_other", "datatype": dbt.type_string()}
{"name": "top_vs_other", "datatype": dbt.type_string()},
{"name": "budget_association_status", "datatype": dbt.type_string()}
] %}

{{ fivetran_utils.add_pass_through_columns(columns, var('microsoft_ads__campaign_passthrough_metrics')) }}
Expand Down
4 changes: 4 additions & 0 deletions models/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ The ad type associated with this record; see the following [documentation](https
The bid match type associated with this record; values include 'Broad', 'Exact', 'Phrase'.
{% enddocs %}

{% docs budget_association_status %}
The status of the campaign's budget.
{% enddocs %}

{% docs campaign_id %}
The ID of the campaign.
{% enddocs %}
Expand Down
2 changes: 2 additions & 0 deletions models/src_microsoft_ads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ sources:
description: '{{ doc("delivered_match_type") }}'
- name: top_vs_other
description: '{{ doc("top_vs_other") }}'
- name: budget_association_status
description: '{{ doc("budget_association_status") }}'
- name: clicks
description: '{{ doc("clicks") }}'
- name: impressions
Expand Down
3 changes: 3 additions & 0 deletions models/stg_microsoft_ads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ models:
- bid_match_type
- delivered_match_type
- top_vs_other
- budget_association_status
columns:
- name: date_day
description: '{{ doc("date_day") }}'
Expand All @@ -310,6 +311,8 @@ models:
description: '{{ doc("delivered_match_type") }}'
- name: top_vs_other
description: '{{ doc("top_vs_other") }}'
- name: budget_association_status
description: '{{ doc("budget_association_status") }}'
- name: clicks
description: '{{ doc("clicks") }}'
- name: impressions
Expand Down
1 change: 1 addition & 0 deletions models/stg_microsoft_ads__campaign_daily_report.sql
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ final as (
bid_match_type,
delivered_match_type,
top_vs_other,
budget_association_status,
fivetran-jamie marked this conversation as resolved.
Show resolved Hide resolved
clicks,
impressions,
spend
Expand Down