Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to create auto refresh view with Epoch date conversion to date in redshift

When I'm trying to convert epoch date(e.g. 1589889600000) to a date format(e.g. 05/19/2020) in redshift(using this TIMESTAMP 'epoch' + column_with_time_in_ms/1000 *INTERVAL '1 second'), I am able to do it but when I'm embedding that query and trying to create a auto refresh materialized view then it is giving error saying " materialized view cannot be created, reason: auto refresh is not supported for materialized view with mutable function. Found mutable function :text.;

like image 587
Amit Avatar asked Oct 21 '25 04:10

Amit


1 Answers

datetime functions are not supported for incremental auto refresh, unfortunately.

Limitations for incremental refresh
...
Mutable functions, such as date-time functions, RANDOM and non-STABLE user-defined functions.

https://docs.aws.amazon.com/redshift/latest/dg/materialized-view-refresh-sql-command.html

like image 141
jydiw Avatar answered Oct 25 '25 15:10

jydiw



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!