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
I have searched the existing issues, and I could not find an existing issue for this feature
I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion
Describe the feature
I work for a company called HackerOne and we have a use case for running unit tests without mocking the inputs. There are a couple of models which are fairly complicated which we currently test with a singular data test. The test basically does the following using SQL:
Does the table contain a row with properties "title: foo, state: 2, amount: 99"
Does the table contain a row with properties "title: bar, state: 9, amount: 50"
...
Because this test passes if there are 0 rows, we have to write the tests in an inverse manner which is hard to understand and debug. When it fails it's unclear why exactly.
So something like the following would be amazing
unit_tests:
- name: the_testmodel: complicated_model # name of the model I'm unit testinggiven: # the mock data for your inputs
- input: ref('accounts') # use a regular dbt model
- input: ref('users') # use a regular dbt modelexpect:
rows:
- { title: foo, state: 2, amount: 99 }
- { title: bar, state: 9, amount: 50 }
Describe alternatives you've considered
Singular data test, which is not very developer friendly
Who will this benefit?
I think this would be beneficial for folks with complicated models that want to do "row" based testing.
Are you interested in contributing this feature?
If possible, sure why not!
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is this your first time submitting a feature request?
Describe the feature
I work for a company called HackerOne and we have a use case for running unit tests without mocking the inputs. There are a couple of models which are fairly complicated which we currently test with a singular data test. The test basically does the following using SQL:
Because this test passes if there are 0 rows, we have to write the tests in an inverse manner which is hard to understand and debug. When it fails it's unclear why exactly.
So something like the following would be amazing
Describe alternatives you've considered
Singular data test, which is not very developer friendly
Who will this benefit?
I think this would be beneficial for folks with complicated models that want to do "row" based testing.
Are you interested in contributing this feature?
If possible, sure why not!
Anything else?
No response
The text was updated successfully, but these errors were encountered: