-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Add expect_table_column_count_to_equal_other_table_times_factor #37
Add expect_table_column_count_to_equal_other_table_times_factor #37
Conversation
9503293
to
9b72523
Compare
9b72523
to
6d95d96
Compare
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.
Hi @nysthee, thanks for submitting this, looks great. I added a small comment re: the integration, but I'll leave it up to you if you want to change that. Let me know either way and I'll go ahead and merge once you're ready.
@@ -117,6 +117,9 @@ models: | |||
max_value: 4 | |||
- dbt_expectations.expect_table_row_count_to_equal_other_table: | |||
compare_model: ref("data_test") | |||
- dbt_expectations.expect_table_row_count_to_equal_other_table_times_factor: | |||
compare_model: ref("data_test") | |||
factor: 1 |
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.
Should we maybe introduce a new test column that is factored up something other than 1
?
I agree, makes sense to make the test a bit more meaningful. I will do it and ping you once it’s there!
- - -
Thomas Nys
+32 475 269 452
https://calendly.com/thomasnys
On 9 April 2021 at 16:10:08, Claus Herther ***@***.***) wrote:
@clausherther approved this pull request.
Hi @nysthee, thanks for submitting this, looks great. I added a small comment re: the integration, but I'll leave it up to you if you want to change that. Let me know either way and I'll go ahead and merge once you're ready.
In integration_tests/models/schema_tests/schema.yml:
@@ -117,6 +117,9 @@ models:
max_value: 4
- dbt_expectations.expect_table_row_count_to_equal_other_table:
compare_model: ref("data_test")
+ - dbt_expectations.expect_table_row_count_to_equal_other_table_times_factor:
+ compare_model: ref("data_test")
+ factor: 1
Should we maybe introduce a new test column that is factored up something other than 1?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I added a new model with factor 2 number of rows of the original table (didn't bother with the content since we only care about the number of rows) |
@nysthee looks good, thanks! |
I will cut a new release this weekend, might wrap some other work into that. Thanks again for your contribution! |
Hi
We have a use case where we have a table a and we want to validate that table b always has a row count that is equal to the row count in table a times a predefined factor.