Skip to content

Commit

Permalink
CI fix 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rlh1994 committed Apr 6, 2023
1 parent 41017fd commit 845d4cb
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 55 deletions.
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
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
13 changes: 10 additions & 3 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,18 @@ seeds:
+column_types:
my_timestamp: timestamp

data_test_equality_floats:
data_test_equality_floats_a:
+column_types:
float_number: float

data_test_equality_floats_columns:
data_test_equality_floats_columns_a:
+column_types:
float_number: float

data_test_equality_floats_b:
+column_types:
float_number: float

data_test_equality_floats_columns_b:
+column_types:
float_number: float
to_ignore: varchar(1)
67 changes: 33 additions & 34 deletions integration_tests/models/generic_tests/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,39 @@ seeds:
ignore_columns:
- col_c

- name: data_test_equality_floats_a
tests:
# test precision only
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_b')
precision: 4
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_b')
precision: 8
error_if: "<1" #sneaky way to ensure that the test is returning failing rows
warn_if: "<0"

- name: data_test_equality_floats_columns_a
tests:
# Positive assertion tests
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns_b')
compare_columns:
- id
- float_number
precision: 4
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns_b')
ignore_columns:
- to_ignore
precision: 4
# all columns should fail even with rounding
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns_b')
precision: 4
error_if: "<1" #sneaky way to ensure that the test is returning failing rows
warn_if: "<0"

models:
- name: recency_time_included
tests:
Expand Down Expand Up @@ -210,40 +243,6 @@ models:
- last_name
- email

- name: test_equality_floats
tests:
# test precision only
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats')
precision: 4
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats')
precision: 8
error_if: "<1" #sneaky way to ensure that the test is returning failing rows
warn_if: "<0"

- name: test_equality_floats_columns
tests:
# Positive assertion tests
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns')
compare_columns:
- id
- float_number
precision: 4
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns')
ignore_columns:
- to_ignore
precision: 4
# all columns should fail even with rounding
- dbt_utils.equality:
compare_model: ref('data_test_equality_floats_columns')
precision: 4
error_if: "<1" #sneaky way to ensure that the test is returning failing rows
warn_if: "<0"


- name: test_fewer_rows_than
tests:
- dbt_utils.fewer_rows_than:
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 845d4cb

Please sign in to comment.