Materialized view failures
Contents
The materialized view failures check fires when a materialized view in your Data Warehouse fails to refresh, which leaves anything that reads from it serving stale data.


What this check looks for
Once a day, the check looks at your Data Warehouse saved queries and raises a warning for any materialized view whose latest materialization failed (or that recorded an error and isn't currently running). The issue includes the view name and the error from the failed run.
Why it matters
Queries and insights that read from the view serve stale data until it refreshes successfully. Common causes are:
- A query that no longer compiles – a renamed column or table it depends on.
- An upstream source that's itself failing.
- A timeout or resource limit on a heavy query.
Fix it manually
- Open Data modeling (the Data Warehouse / data modeling section).
- Find the failing view, open its latest materialization run, and read the error.
- Fix the view's SQL or the upstream dependency.
- Re-run the materialization and confirm it succeeds.
Fix it automatically with the Inbox and PostHog Code
With the Inbox and health checks enabled as a signal source, the agent will:
- Read the view name and error from the issue.
- Inspect your warehouse schema and run the view's query (or its upstream tables) to pinpoint what broke.
- Propose the corrected query and have it re-run.
The view's SQL is stored in PostHog data modeling rather than your codebase, so the fix is applied there via the MCP tools. The check clears once a materialization succeeds.