Scheduling queries using Amazon Redshift Query Editor V2
Amazon Redshift Query Editor V2 (QEV2) allows users to schedule queries on the Redshift data warehouse. Users can schedule long-running or time-sensitive queries, refresh materialized views at regular intervals, and load or unload data.
In this recipe, we will automate the refresh of the customer_agg_mv materialized view, so that the data is up to date when the base tables change.
Getting ready
To complete this recipe, you will need the following:
- Amazon Redshift data warehouse (serverless or provisioned cluster) endpoint deployed in AWS Region eu-west-1
- IAM user with access to Amazon Redshift, Amazon Redshift QEV2, and Amazon EventBridge
- IAM role attached to Amazon Redshift data warehouse that can access Amazon EventBridge; we will reference it in the recipes as
[Your-Redshift_Role] - We will reuse the
customer_agg_mvmaterialized view that was set up using the Chapter 2 recipe titled...