Conversation
added 5 commits
December 20, 2023 07:11
* 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.
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
Collaborator
Author
|
@karolinastawicka thanks for your review! I loved the suggestions and tried to add them with my changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
At the moment we still need a lot of repetitive code to define our tests: Each
from_mockscall needs to specify all the input table mocks even if their data would not change between tests.What changed
We added a
default_inputsargument to thetable_metadecorator. 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: