-
Notifications
You must be signed in to change notification settings - Fork 179
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
Feat: Add plan option to show rendered model diff #3691
base: main
Are you sure you want to change the base?
Conversation
sqlmesh/core/model/definition.py
Outdated
self, | ||
include_python: bool = True, | ||
include_defaults: bool = False, | ||
render_model: bool = False, |
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.
render_query
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.
here and everywhere
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 thought render_model
was more fitting because we'll also render it's statements along with the query, but don't have strong feelings about it
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.
^ makes sense to me.
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.
Pinging @izeigerman because this was resolved before, any final preference between the two?
@@ -335,6 +335,7 @@ Options: | |||
application (prod environment only). | |||
--enable-preview Enable preview for forward-only models when | |||
targeting a development environment. | |||
--rendered-model-diff Output text differences for the rendered versions of models |
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 think these docs are outdated? Isn't the option diff-rendered
after the recent renaming? Standalone audits can be diffed as well.
Fixes #1254
The default behavior of plan diff is to compare raw models i.e the original queries & statements:
This PR introduces the
sqlmesh plan --rendered-model-diff
which instead compares rendered queries/statements: