-
Notifications
You must be signed in to change notification settings - Fork 5
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
Provide default mocks in table_meta #19
Conversation
* The table_meta decorator now accepts default input mock tables * Bonus: Fix bug with empty inputs in BigQuery
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.
I love this solution! It saves a lot of time and allows you to only add/change the specific fields you want - especially useful if it's more than 3 column like in example.
Maybe worth adding in the default_values.md.txt
that another plus of it is that it allows you to change only one column (or only those that you really need to change in your test case, not redefine all). If it is clear somewhere else in the documentation, and I didn't spot it, then ignore this comment.
🦐
c23c7f1
to
114a232
Compare
@karolinastawicka thanks for your review! I loved the suggestions and tried to add them with my changes. |
Problem
At the moment we still need a lot of repetitive code to define our tests: Each
from_mocks
call needs to specify all the input table mocks even if their data would not change between tests.What changed
We added a
default_inputs
argument to thetable_meta
decorator. This allows to pass reasonable default to the model.Here is an example from the docs:
What to look for
You can ignore the changes in
docs/
since they are auto generated from thedocsource/
markdown file changes.Instead, have a look at: