-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Raise PropertyMovedToConfigDeprecation instead of CustomTopLevelKeyDeprecation when additional attribute is a valid config #11879
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
Conversation
|
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. |
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (8.69%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #11879 +/- ##
==========================================
- Coverage 91.91% 91.87% -0.05%
==========================================
Files 199 199
Lines 24347 24368 +21
==========================================
+ Hits 22379 22387 +8
- Misses 1968 1981 +13
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
aa7ccde to
481e4b6
Compare
…precation when additional attribute is a valid config (#11879) (#11893) (cherry picked from commit d27232a) Co-authored-by: Michelle Ark <[email protected]>
Problem
Currently the following model definition:
raises a
CustomTopLevelKeyDeprecation- which is misleading because access is not 'custom' to the user - it's an accepted config part of the dbt framework. dbt-autofix reports fixing this issue as fixingPropertyMovedToConfigDeprecationas well.Solution
Check if a field is a valid config prior and raising the more appropriate
PropertyMovedToConfigDeprecationif it is.Finding what valid fields are based on the schema was a little challenging to get right since we have many levels of nesting and fields with config! (e.g. sources, tables, columns)
Checklist