adding current date to a materialized view in Amazon Redshift

Viewed 1549

we are using Amazon redshift, when we are creating a materialized view with a column to capture current date along with some other columns from a specific table, it is giving an error stating Materialized view cannot contain mutate functions.

Following is the sample code:

CREATE MATERIALIZED VIEW SAMPLE_TEST AS SELECT CURRENT_DATE FROM TABLE_A;

I have also used SYSDATE, GETDATE(), NOW() instead of CURRENT_DATE as well.

but everything is mutable function it seems

it is throwing an error as below: Amazon Invalid operation: Materialized views cannot contain mutable functions. The given materialized view contains one or more of the following mutable functions: CURRENT_DATE

0 Answers
Related