-
Notifications
You must be signed in to change notification settings - Fork 6
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
validations #32
Merged
Merged
validations #32
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f5d2c11
validations
fivetran-jamie 2cbd70f
polishes
fivetran-jamie 4f148ca
docs
fivetran-jamie 9b8c38f
changelog
fivetran-jamie fd20860
changelog
fivetran-jamie 68847e5
package dep update
fivetran-jamie 00825b9
catherine feedback
fivetran-jamie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,5 @@ | ||
packages: | ||
- package: fivetran/microsoft_ads_source | ||
version: [">=0.8.0", "<0.9.0"] | ||
# - package: fivetran/microsoft_ads_source | ||
# version: [">=0.9.0", "<0.10.0"] | ||
- git: https://github.com/fivetran/dbt_microsoft_ads_source.git | ||
revision: bugfix/campaign-report-add-budget | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder to swap before release. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include the specific release of the source package here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I know it is duplicative but can we include the relevant release notes from the source package here. Just to make it easier for folks to follow along as to why this is being marked as a breaking change.