Redshift Editor V2 doesn't script materialized view with autorefresh YES

0

I have a materialized view with autorefresh set to on. When I script it out, it doesn't show the argument AUTO REFRESH YES.

select autorefresh,* from STV_MV_INFO;

Enter image description here

It shows this when i right click on the proc and click view definition:

CREATE MATERIALIZED VIEW globaldata.vwdeviceplatform AS select xyz..

it should show this:

CREATE MATERIALIZED VIEW globaldata.vwdeviceplatform AUTO REFRESH YES as select xyz...

Also strangely, getting the viewdef through here also doesn't script out the autorefresh portion SELECT pg_catalog.pg_get_viewdef('globaldata.vwdeviceplatform'::regclass::oid, true); ;

I'm signed to AWS Editor V2 via Okta and I'm using a role, as opposed to a direct redshift login/pw. Is this just a limitation?

질문됨 일 년 전253회 조회
1개 답변
0

Hello,

In this context, please note that STV_MV_INFO table contains DDL used while creating the materialized view.

If the materialized view is created with below command:

—> CREATE MATERIALIZED VIEW globaldata.vwdeviceplatform AS select xyz..

After creating the mv we can turn on AUTO REFRESH Using -

—> ALTER MATERIALIZED VIEW globaldata.vwdeviceplatform AUTO REFRESH YES;

[+] https://docs.aws.amazon.com/redshift/latest/dg/r_ALTER_MATERIALIZED_VIEW.html

Now even if autorefresh=’t’ in STV_MV_INFO table, the view definition will be same as below:

CREATE MATERIALIZED VIEW globaldata.vwdeviceplatform AS select xyz..

Same goes with pg_get_viewdef function. So, in both the cases you will get the DDL used while creating the mv only.

That being said, if you would like resource based troubleshooting, please raise a support case with AWS for further information. If a support case has already been created please be assured that we will get back to you and assist you in the best way possible.

AWS
Simmi_K
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠