By using AWS re:Post, you agree to the Terms of Use

Setting up refresh schedules for Amazon Redshift materialized view


I am looking to refresh materialized views in Amazon Redshift on a schedule. Having read various documentation, I am unable to find details on how (if at all possible) to create a schedule to automatically update the materialized view.

asked 2 years ago967 views
2 Answers
Accepted Answer

There are several ways this could be achieved -

  • Amazon Redshift now has a scheduler feature to schedule running of queries on a cluster which can easily take care of this. For more details refer Video: Schedule a query or Schedule a query
  • To use the new Redshift Data APIs from AWS Lambda to run the REFRESH statement and schedule the AWS Lambda Function through Amazon EventBridge or to add the call to the AWS Lambda in the ETL workflow.
  • Using AWS Glue and AWS Glue Workflow a AWS Glue Python Shell job would also work.
answered 2 years ago

Amazon Redshift can automatically refresh materialized views with up-to-date data from its base tables when materialized views are created with or altered to have the autorefresh option. For more details, refer to the documentation here,

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions