Materialize view purging or lifespan #9541
-
Hi: Is there any way to run a materialize query for a certain time span ? From what I understand, a materialized view runs forever. But is there any ability to apply some time constraints on the view and then expire the materialized view ? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @mans2singh, by The first one is supported by temporal filters: https://www.risingwave.dev/docs/current/sql-pattern-temporal-filters/ We don't support the second one right now. I would recommend doing it out of RW, e.g. from a client to the database. Set a cron job etc. |
Beta Was this translation helpful? Give feedback.
Hi @mans2singh,
by
expiring the materialized view
, do you want to see that the data being materialized in the view is always restricted to a recent period of time, or do you want to see that this materialized view getsdropped
after XX minutes?The first one is supported by temporal filters: https://www.risingwave.dev/docs/current/sql-pattern-temporal-filters/
The examples in the doc also applies to
create materialized view XXX as select ...;
We don't support the second one right now. I would recommend doing it out of RW, e.g. from a client to the database. Set a cron job etc.