Sample Header Ad - 728x90

Postgres Materialized Views keeps getting dropped every time underlying views is updated

1 vote
1 answer
1330 views
I am using Postgres as my DB and I have a bunch of Materialized Views that are created from a view. The MVs are in Schema B and Views are in Schema A. They are created like create SchemaB.mv1 as select * from SchemaA.vw1. However, every time the underlying view is updated, my materialized view is being dropped. My underlying view is created through DBT using the run command. According to this documentation , DBT drops and re-creates the views that are created. Because of this drop and re-create process, I am wondering if this causes my MVs drop? If the underlying table/view of the MV is dropped, is the MV also dropped?
Asked by user16573033 (11 rep)
May 30, 2022, 06:25 PM
Last activity: May 30, 2022, 08:27 PM