You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in the fewer_rows_than test, the model must have fewer rows than the compare_model for the test to pass. The two tables having the same number of rows returns 1, which fails the test. I would like to add an argument that would allow for two tables having the same number of rows to pass this test, effectively making it a fewer_or_equal_rows_than test.
For implementation, I imagine something like a pass_if_equal flag that is set to false by default (not changing the current functionality at all) but setting it to true would allow for the two tables having equal rows to pass.
Describe alternatives you've considered
Considered making a test that has this functionality locally.
Have looked at the dbt_expectations package for this functionality but similarly have not found it.
Who will this benefit?
This is probably fairly niche, but for anyone wanting to test tables that could have a 1:1 relationship between rows or something less, but not more, this would be useful. For example I have a transform that under certain circumstances could collapse multiple rows in one table into one row in a downstream table. The downstream table should have fewer than or the equal rows to the upstream table.
Are you interested in contributing this feature?
I'm interested in contributing this feature -- I don't think it should be super hard to do, but it's my first time contributing here.
The text was updated successfully, but these errors were encountered:
@dbt-labs/oss-maintainers seeing a few more places where having this functionality would be useful. Would love some input on adding this functionality!
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days.
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers.
Describe the feature
Currently in the
fewer_rows_than
test, the model must have fewer rows than the compare_model for the test to pass. The two tables having the same number of rows returns1
, which fails the test. I would like to add an argument that would allow for two tables having the same number of rows to pass this test, effectively making it afewer_or_equal_rows_than
test.For implementation, I imagine something like a
pass_if_equal
flag that is set to false by default (not changing the current functionality at all) but setting it to true would allow for the two tables having equal rows to pass.Describe alternatives you've considered
dbt_expectations
package for this functionality but similarly have not found it.Who will this benefit?
This is probably fairly niche, but for anyone wanting to test tables that could have a 1:1 relationship between rows or something less, but not more, this would be useful. For example I have a transform that under certain circumstances could collapse multiple rows in one table into one row in a downstream table. The downstream table should have fewer than or the equal rows to the upstream table.
Are you interested in contributing this feature?
I'm interested in contributing this feature -- I don't think it should be super hard to do, but it's my first time contributing here.
The text was updated successfully, but these errors were encountered: