-
Notifications
You must be signed in to change notification settings - Fork 101
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
Define event_monitoring_live_v1
views in view.sql
files
#4576
Merged
Merged
Changes from 8 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
344c091
Define `event_monitoring_live_v1` views in `view.sql` files.
sean-rose ffb4abe
Overwrite existing `event_monitoring_live_v1` views on deployment.
sean-rose a472eb3
Support materialized views in view naming validation.
sean-rose 08da23b
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose eb7e0c3
Update `EventMonitoringLive.no_init` logic.
sean-rose de673f3
Apply formatting required by Black.
sean-rose 4372bd9
Don't try to overwrite existing `event_monitoring_live_v1` views on d…
sean-rose efe99b0
Handle `IF NOT EXISTS` in view naming validation.
sean-rose 12808ce
Use regular expression to extract view ID in view naming validation.
sean-rose 7a6651b
Update other view regular expressions to allow for materialized views.
sean-rose 43c3944
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose deb8007
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose e6ee23f
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose cd79f3b
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose b83abad
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose 7e0774d
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose 601207f
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose b81b482
Merge branch 'main' into event_monitoring_live_v1-views
sean-rose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
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.
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 took me a minute to parse. Not sure if some comments might make sense here?
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.
Yeah, I was annoyed how verbose this logic ended up being. I was hoping we could just grab the first identifier token, but unfortunately sqlparse currently misclassifies the
MATERIALIZED
keyword as an identifier.Actually, since this isn't a pressing issue, I think I'll wait for them to fix the bug I submitted, then this can be simplified to just look for the first identifier token.
Or an alternate approach would be using sqlparse just to remove comments from the SQL, then using regular expressions to extract the view ID.
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've implemented this alternate approach.