-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7099937
commit b8fab76
Showing
8 changed files
with
51 additions
and
25 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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with source as ( | ||
select | ||
customer_id, | ||
count(*) as source_customer_tag_count | ||
from {{ target.schema }}_shopify_dev.stg_shopify__customer_tag | ||
group by 1 | ||
), | ||
|
||
transform as ( | ||
select | ||
customer_id, | ||
count(*) as transform_customer_tag_count | ||
from {{ target.schema }}_shopify_dev.shopify__customers | ||
where customer_tags is not null | ||
group by 1 | ||
), | ||
|
||
compare as ( | ||
select | ||
source.customer_id, | ||
source.source_customer_tag_count, | ||
transform.transform_customer_tag_count | ||
from source | ||
full outer join transform | ||
on source.customer_id = transform.customer_id | ||
where source.source_customer_tag_count != transform.transform_customer_tag_count | ||
) | ||
|
||
select * | ||
from compare |
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