-
Notifications
You must be signed in to change notification settings - Fork 506
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add precision + exclude_columns option to equality test (#765)
* add exclude columns to equality test * add precision option to equality test * CI fix? * CI fix 2.0 * Update CHANGELOG.md * Check for subset of columns (Close #785) * cast type * cast type across warehouses * swap to copiler error, account for ignore columns * Update CL * allow for different cased names * fix CL * linting * Rename to exclude_columns * Fix typo * Add package-lock.yaml to .gitignore * Update comments --------- Co-authored-by: bruno <[email protected]> Co-authored-by: Joel Labes <[email protected]> Co-authored-by: gwen windflower <[email protected]>
- Loading branch information
1 parent
677ae1a
commit 23da1f4
Showing
14 changed files
with
266 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
target/ | ||
dbt_modules/ | ||
logs/ | ||
.env/ | ||
profiles.yml | ||
package-lock.yml |
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 @@ | ||
col_a,col_b,col_c | ||
1,1,3 | ||
1,2,1 | ||
2,3,3 |
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 @@ | ||
col_a,col_b,col_c | ||
1,1,2 | ||
1,2,2 | ||
2,3,2 |
11 changes: 11 additions & 0 deletions
11
integration_tests/data/schema_tests/data_test_equality_floats_a.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,11 @@ | ||
id,float_number | ||
05ac09c4-f947-45a8-8c14-88f430f8b294,62.3888186 | ||
cfae9054-940b-42a1-84d4-052daae6194f,81.2511656 | ||
6029501d-c274-49f2-a69d-4c75a3d9931d,23.3959675 | ||
c653e520-df81-4a5f-b44b-bb1b4c1b7846,72.2100841 | ||
59caed0d-53d6-473c-a88c-3726c7693f05,68.6029434 | ||
b441f6a0-ce7f-4ad9-b96b-b41d73a94ae7,72.7861425 | ||
26491840-bfd4-4496-9ca9-ad9220a2de47,35.3662223 | ||
b4f233ce-a494-4bb6-9cf2-73bb6854e58a,89.1524680 | ||
11c979b7-2661-4375-8143-7c9b54b90627,19.5755431 | ||
a8057f73-312e-48e6-b344-f4a510a2c4a8,22.9237047 |
11 changes: 11 additions & 0 deletions
11
integration_tests/data/schema_tests/data_test_equality_floats_b.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,11 @@ | ||
id,float_number | ||
05ac09c4-f947-45a8-8c14-88f430f8b294,62.3888187 | ||
cfae9054-940b-42a1-84d4-052daae6194f,81.2511657 | ||
6029501d-c274-49f2-a69d-4c75a3d9931d,23.3959676 | ||
c653e520-df81-4a5f-b44b-bb1b4c1b7846,72.2100842 | ||
59caed0d-53d6-473c-a88c-3726c7693f05,68.6029435 | ||
b441f6a0-ce7f-4ad9-b96b-b41d73a94ae7,72.7861426 | ||
26491840-bfd4-4496-9ca9-ad9220a2de47,35.3662224 | ||
b4f233ce-a494-4bb6-9cf2-73bb6854e58a,89.1524681 | ||
11c979b7-2661-4375-8143-7c9b54b90627,19.5755432 | ||
a8057f73-312e-48e6-b344-f4a510a2c4a8,22.9237048 |
11 changes: 11 additions & 0 deletions
11
integration_tests/data/schema_tests/data_test_equality_floats_columns_a.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,11 @@ | ||
id,float_number,to_ignore | ||
05ac09c4-f947-45a8-8c14-88f430f8b294,62.3888186,a | ||
cfae9054-940b-42a1-84d4-052daae6194f,81.2511656,a | ||
6029501d-c274-49f2-a69d-4c75a3d9931d,23.3959675,a | ||
c653e520-df81-4a5f-b44b-bb1b4c1b7846,72.2100841,a | ||
59caed0d-53d6-473c-a88c-3726c7693f05,68.6029434,a | ||
b441f6a0-ce7f-4ad9-b96b-b41d73a94ae7,72.7861425,a | ||
26491840-bfd4-4496-9ca9-ad9220a2de47,35.3662223,a | ||
b4f233ce-a494-4bb6-9cf2-73bb6854e58a,89.1524680,a | ||
11c979b7-2661-4375-8143-7c9b54b90627,19.5755431,a | ||
a8057f73-312e-48e6-b344-f4a510a2c4a8,22.9237047,a |
11 changes: 11 additions & 0 deletions
11
integration_tests/data/schema_tests/data_test_equality_floats_columns_b.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,11 @@ | ||
id,float_number,to_ignore | ||
05ac09c4-f947-45a8-8c14-88f430f8b294,62.3888186,b | ||
cfae9054-940b-42a1-84d4-052daae6194f,81.2511656,b | ||
6029501d-c274-49f2-a69d-4c75a3d9931d,23.3959675,b | ||
c653e520-df81-4a5f-b44b-bb1b4c1b7846,72.2100841,b | ||
59caed0d-53d6-473c-a88c-3726c7693f05,68.6029434,b | ||
b441f6a0-ce7f-4ad9-b96b-b41d73a94ae7,72.7861425,b | ||
26491840-bfd4-4496-9ca9-ad9220a2de47,35.3662223,b | ||
b4f233ce-a494-4bb6-9cf2-73bb6854e58a,89.1524680,b | ||
11c979b7-2661-4375-8143-7c9b54b90627,19.5755431,b | ||
a8057f73-312e-48e6-b344-f4a510a2c4a8,22.9237047,b |
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/models/generic_tests/equality_less_columns.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 @@ | ||
with data as ( | ||
|
||
select * from {{ ref('data_test_equality_b') }} | ||
|
||
) | ||
|
||
select | ||
col_a, col_b | ||
from data |
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
select | ||
id, | ||
name, | ||
favorite_color | ||
favorite_color, | ||
favorite_number | ||
|
||
from {{ ref('test_union_base') }} | ||
|
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