awslabs / awslabs/amazon-redshift-utils
Finding dependencies of materialized views
- Dominant language
- Python
- Stars
- 2.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hi there.
The v_view_dependency script:
https://github.com/awslabs/amazon-redshift-utils/blob/master/src/AdminViews/v_view_dependency.sql#L1
does not work for materialized views.
I had a table that would not drop without 'cascade'. I could not find a dependency via the view. Dropping the table I discovered a materialized view was dropped.
It would be useful if we could use the `v_view_dependency` view for materialized views.
thanks
Contributor guide
Research direction
Start with src/AdminViews/v_view_dependency.sql and reproduce the reported case where dropping a table also drops a materialized view. Review how the view finds dependencies, then verify that materialized-view dependencies appear in its results and that the original table can be identified before a cascade drop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100