-
Notifications
You must be signed in to change notification settings - Fork 178
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
bug/Dynamic-table-comment-on-syntax #770
bug/Dynamic-table-comment-on-syntax #770
Conversation
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @kaarthik108 |
Thanks for the PR @kaarthik108! I just had two nits, but otherwise I'm good with it as long as tests pass. |
@mikealfare a curious question: Would it simplify the code paths if this: DynamicTable = "dynamic_table" is updated to this? DynamicTable = "dynamic table" We can imagine a world in which "this one weird trick" irons out everything nicely, and all the if/elses go away ✨ We can also imagine a word in which it creates a bunch of wrinkles elsewhere that we don't want 🙅 Obviously up to you either way you want to go, but at least a possibility to consider. |
That's a good question, and one we've discussed a bit due to issues like this one. dbt's interface almost everywhere (I say "almost" because I can't confirm it off the top of my head) is snake case. After discussing, we landed on keeping it snake case for consistency. I also wouldn't want the enum to serve multiple purposes (and I don't like that we currently do that in other places). It should solely focus on identifying the type of relation we're working with. The string representation of the enum also happens to also be the text that gets put into the jinja template most times, specifically for tables in views. However, that obviously doesn't work for dynamic tables and materialized views, which have spaces. It also doesn't even work for tables/views all the time. IIRC, you can't drop a view in postgres by running |
* bug/Dynamic-table-comment-on-syntax * Add changelog * Fix relation type * Fix alter (cherry picked from commit 903ccea)
* bug/Dynamic-table-comment-on-syntax * Add changelog * Fix relation type * Fix alter (cherry picked from commit 903ccea) Co-authored-by: Kaarthik Andavar <[email protected]>
* bug/Dynamic-table-comment-on-syntax * Add changelog * Fix relation type * Fix alter
resolves #769
docs N/A
Problem
This will fix the comment syntax for dynamic tables
from
comment on dynamic_table
tocomment on dynamic table
Solution
Just splitting the relation_type based on '_' only on dynamic tables
Checklist