Redshift Materialized View Not Refreshing (No Error)

Viewed 1444

I have a materialized view in Redshift that refreshes fine when I run refresh materialized view command, however the AWS Glue job is failing to refresh.

I'm not seeing any kind of error in the logs and reviewing the redshift query history shows it completing successfully. Additionally, the update time is the same so it does appear to be running correctly. However querying the view after glue updates does not show updated records, but does if I run the refresh.

I have ran the following permissions to grant the glue account access.

alter table reporting.my_view owner to glue;

alter schema reporting owner to glue;

grant all on schema reporting to glue;
grant all on all tables in schema reporting to glue;
alter default privileges in schema reporting grant all on tables to glue;
1 Answers

Try to use "commit;" before your main post actions query, for example: "postactions": "commit; your_query"

REFRESH works for commited records only.

Related