-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* validations * polishes * docs * changelog * changelog * package dep update * catherine feedback
- Loading branch information
1 parent
3a7a998
commit 36e7d9e
Showing
11 changed files
with
91 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
packages: | ||
- local: ../ | ||
- local: ../ |
45 changes: 45 additions & 0 deletions
45
integration_tests/tests/consistency/consistency_campaign_report.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
campaign_id, | ||
sum(clicks) as clicks, | ||
sum(impressions) as impressions, | ||
sum(spend) as spend | ||
from {{ target.schema }}_microsoft_ads_prod.microsoft_ads__campaign_report | ||
group by 1 | ||
), | ||
|
||
dev as ( | ||
select | ||
campaign_id, | ||
sum(clicks) as clicks, | ||
sum(impressions) as impressions, | ||
sum(spend) as spend | ||
from {{ target.schema }}_microsoft_ads_dev.microsoft_ads__campaign_report | ||
group by 1 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.campaign_id, | ||
prod.clicks as prod_clicks, | ||
dev.clicks as dev_clicks, | ||
prod.impressions as prod_impressions, | ||
dev.impressions as dev_impressions, | ||
prod.spend as prod_spend, | ||
dev.spend as dev_spend | ||
from prod | ||
full outer join dev | ||
on dev.campaign_id = prod.campaign_id | ||
) | ||
|
||
select * | ||
from final | ||
where | ||
abs(prod_clicks - dev_clicks) >= .01 | ||
or abs(prod_impressions - dev_impressions) >= .01 | ||
or abs(prod_spend - dev_spend) >= .01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
- package: fivetran/microsoft_ads_source | ||
version: [">=0.8.0", "<0.9.0"] | ||
version: [">=0.9.0", "<0.10.0"] |