-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
raise MicrobatchModelNoEventTimeInputs warning when no microbatch input has event_time config #10929
raise MicrobatchModelNoEventTimeInputs warning when no microbatch input has event_time config #10929
Conversation
…ut has event_time config
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
core/dbt/events/types.py
Outdated
def message(self) -> str: | ||
msg = ( | ||
f"The microbatch model '{self.model_name}' has no 'ref' or 'source' input with an 'event_time' configuration. " | ||
"This can result in unexpected duplicate records in the resulting microbatch model." |
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.
cc @graciegoheen for any input on the warning message
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.
This can result in unexpected duplicate records in the resulting microbatch model.
Thoughts on this vs. "This means no filtering can be applied and can result in unexpected duplicate records in the resulting microbatch model."
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.
much better!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10929 +/- ##
==========================================
- Coverage 89.18% 87.75% -1.43%
==========================================
Files 183 183
Lines 23476 23491 +15
==========================================
- Hits 20936 20615 -321
- Misses 2540 2876 +336
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Wooooo! Thank you for taking care of this issue 🙂
Resolves #10926
Problem
It can be unintuitive for users that they need to configure microbatch models by adding
event_time
fields to input models. For microbatch models with noevent_time
configuration, this can lead to unexpected duplicate data given it is likely not the intended use case to have microbatch but no event time filters.Solution
Emit a warning only when no inputs to a microbatch model have an event_time config.
Checklist
🎩