-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from leoebfolsom/lf/issue-49--compare_all_colu…
…mns_macro_for_testing lf/issue-49 compare all columns macro for testing
- Loading branch information
Showing
17 changed files
with
404 additions
and
83 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
target/ | ||
dbt_packages/ | ||
logs/ | ||
logfile |
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
11 changes: 11 additions & 0 deletions
11
integration_tests/models/compare_all_columns_where_clause.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,11 @@ | ||
{% set a_relation=ref('data_compare_all_columns__market_of_choice_produce')%} | ||
|
||
{% set b_relation=ref('data_compare_all_columns__albertsons_produce') %} | ||
|
||
{{ audit_helper.compare_all_columns( | ||
a_relation=a_relation, | ||
b_relation=b_relation, | ||
primary_key="id", | ||
summarize=false | ||
) }} | ||
where not perfect_match |
9 changes: 9 additions & 0 deletions
9
integration_tests/models/compare_all_columns_with_summary.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,9 @@ | ||
{% set a_relation=ref('data_compare_all_columns__market_of_choice_produce')%} | ||
|
||
{% set b_relation=ref('data_compare_all_columns__albertsons_produce') %} | ||
|
||
{{ audit_helper.compare_all_columns( | ||
a_relation=a_relation, | ||
b_relation=b_relation, | ||
primary_key="id" | ||
) }} |
10 changes: 10 additions & 0 deletions
10
integration_tests/models/compare_all_columns_with_summary_and_exclude.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,10 @@ | ||
{% set a_relation=ref('data_compare_all_columns__market_of_choice_produce')%} | ||
|
||
{% set b_relation=ref('data_compare_all_columns__albertsons_produce') %} | ||
|
||
{{ audit_helper.compare_all_columns( | ||
a_relation=a_relation, | ||
b_relation=b_relation, | ||
primary_key="id", | ||
exclude_columns=['ripeness'] | ||
) }} |
10 changes: 10 additions & 0 deletions
10
integration_tests/models/compare_all_columns_without_summary.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,10 @@ | ||
{% set a_relation=ref('data_compare_all_columns__market_of_choice_produce')%} | ||
|
||
{% set b_relation=ref('data_compare_all_columns__albertsons_produce') %} | ||
|
||
{{ audit_helper.compare_all_columns( | ||
a_relation=a_relation, | ||
b_relation=b_relation, | ||
primary_key="id", | ||
summarize=false | ||
) }} |
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
9 changes: 9 additions & 0 deletions
9
integration_tests/seeds/data_compare_all_columns__albertsons_produce.csv
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,9 @@ | ||
id,fruit,ripeness | ||
1,banana,yellow | ||
2,banana,brown | ||
3,banana,brown | ||
4,orange,green | ||
5,orange,orange | ||
6,,brown | ||
7,orange,orange | ||
9,apple,mushy |
9 changes: 9 additions & 0 deletions
9
integration_tests/seeds/data_compare_all_columns__market_of_choice_produce.csv
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,9 @@ | ||
id,fruit,ripeness | ||
1,banana,yellow | ||
2,banana,green | ||
3,banana,brown | ||
4,orange,green | ||
5,orange,orange | ||
6,orange,brown | ||
7,orange, | ||
8,apple,mushy |
10 changes: 10 additions & 0 deletions
10
integration_tests/seeds/expected_results__compare_all_columns_where_clause.csv
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,10 @@ | ||
primary_key,column_name,perfect_match,null_in_a,null_in_b,missing_from_a,missing_from_b,conflicting_values | ||
8,ID,false,false,false,false,true,false | ||
9,ID,false,false,false,true,false,false | ||
6,FRUIT,false,false,true,false,false,false | ||
8,FRUIT,false,false,false,false,true,false | ||
9,FRUIT,false,false,false,true,false,false | ||
2,RIPENESS,false,false,false,false,false,true | ||
7,RIPENESS,false,true,false,false,false,false | ||
8,RIPENESS,false,false,false,false,true,false | ||
9,RIPENESS,false,false,false,true,false,false |
4 changes: 4 additions & 0 deletions
4
integration_tests/seeds/expected_results__compare_all_columns_with_summary.csv
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,4 @@ | ||
column_name,perfect_match,null_in_a,null_in_b,missing_from_a,missing_from_b,conflicting_values | ||
ID,7,0,0,1,1,0 | ||
FRUIT,6,0,1,1,1,0 | ||
RIPENESS,5,1,0,1,1,1 |
3 changes: 3 additions & 0 deletions
3
integration_tests/seeds/expected_results__compare_all_columns_with_summary_and_exclude.csv
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,3 @@ | ||
column_name,perfect_match,null_in_a,null_in_b,missing_from_a,missing_from_b,conflicting_values | ||
ID,7,0,0,1,1,0 | ||
FRUIT,6,0,1,1,1,0 |
28 changes: 28 additions & 0 deletions
28
integration_tests/seeds/expected_results__compare_all_columns_without_summary.csv
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,28 @@ | ||
primary_key,column_name,perfect_match,null_in_a,null_in_b,missing_from_a,missing_from_b,conflicting_values | ||
1,ID,true,false,false,false,false,false | ||
2,ID,true,false,false,false,false,false | ||
3,ID,true,false,false,false,false,false | ||
4,ID,true,false,false,false,false,false | ||
5,ID,true,false,false,false,false,false | ||
6,ID,true,false,false,false,false,false | ||
7,ID,true,false,false,false,false,false | ||
8,ID,false,false,false,false,true,false | ||
9,ID,false,false,false,true,false,false | ||
1,FRUIT,true,false,false,false,false,false | ||
2,FRUIT,true,false,false,false,false,false | ||
3,FRUIT,true,false,false,false,false,false | ||
4,FRUIT,true,false,false,false,false,false | ||
5,FRUIT,true,false,false,false,false,false | ||
6,FRUIT,false,false,true,false,false,false | ||
7,FRUIT,true,false,false,false,false,false | ||
8,FRUIT,false,false,false,false,true,false | ||
9,FRUIT,false,false,false,true,false,false | ||
1,RIPENESS,true,false,false,false,false,false | ||
2,RIPENESS,false,false,false,false,false,true | ||
3,RIPENESS,true,false,false,false,false,false | ||
4,RIPENESS,true,false,false,false,false,false | ||
5,RIPENESS,true,false,false,false,false,false | ||
6,RIPENESS,true,false,false,false,false,false | ||
7,RIPENESS,false,true,false,false,false,false | ||
8,RIPENESS,false,false,false,false,true,false | ||
9,RIPENESS,false,false,false,true,false,false |
Oops, something went wrong.