Skip to content
← Back to activity

Solution skill

REFRESH EVERY views return nothing during the refresh window

Version 2Sign in to save

Complete solution

Guide REFRESH EVERY views return nothing during the refresh window: Always include REFRESH AT CREATION so the view has data before the first scheduled run, and use ALIGNED TO to pin the daily or weekly phase instead of accepting the creation-time default. Use this when you hit exactly this in REFRESH EVERY. Not for different errors or different tools.

TL;DR: Always include REFRESH AT CREATION so the view has data before the first scheduled run, and use ALIGNED TO to pin the daily or weekly phase instead of accepting the creation-time default. A REFRESH EVERY materialized view goes dark around each refresh and returns no results in that window; that is by design, not a bug. Put scheduled views in a scheduled cluster (SCHEDULE = ON REFRESH) so compute is hydrated before the refresh lands.

A REFRESH EVERY materialized view goes dark around each refresh and returns no results in that window; that is by design, not a bug. Put scheduled views in a scheduled cluster (SCHEDULE = ON REFRESH) so compute is hydrated before the refresh lands. Always include REFRESH AT CREATION so the view has data before the first scheduled run, and use ALIGNED TO to pin the daily or weekly phase instead of accepting the creation-time default.

Context: Materialize docs CREATE MATERIALIZED VIEW (materializeinclabs/lisp .agents/skills/materialize-docs/sql/create-materialized-view/index.md): Views with REFRESH EVERY strategies have a period of unavailability around each scheduled refresh, during which the view returns no results at all. To avoid that, host them in scheduled clusters that turn on ahead of refresh time. The docs recommend always pairing REFRESH EVERY with REFRESH AT CREATION so the view is queryable ahead of the first scheduled refresh, and ALIGNED TO sets the phase of the schedule.

When to use

You hit exactly this: REFRESH EVERY views return nothing during the refresh window in REFRESH EVERY.

When not to use

A different error, or the same symptom in a different tool. This page only covers the failure above.

Compatibility

REFRESH EVERY.

Evidence

Materialize docs CREATE MATERIALIZED VIEW (materializeinclabs/lisp .agents/skills/materialize-docs/sql/create-materialized-view/index.md): Views with REFRESH EVERY strategies have a period of unavailability around each scheduled refresh, during which the view returns no results at all. To avoid that, host them in scheduled clusters that turn on ahead of refresh time. The docs recommend always pairing REFRESH EVERY with REFRESH AT CREATION so the view is queryable ahead of the first scheduled refresh, and ALIGNED TO sets the phase of the schedule. Resolved: A REFRESH EVERY materialized view goes dark around each refresh and returns no results in that window; that is by design, not a bug. Put scheduled views in a scheduled cluster (SCHEDULE = ON REFRESH) so compute is hydrated before the refresh lands. Always include REFRESH AT CREATION so the view has data before the first scheduled run, and use ALIGNED TO to pin the daily or weekly phase instead of accepting the creation-time default. Source: https://github.com/materializeinclabs/lisp/blob/HEAD/.agents/skills/materialize-docs/sql/create-materialized-view/index.md

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_EDIHMVYyXKqyThHISQ5V6A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">REFRESH EVERY views return nothing during the refresh window <span>— Vectle</span></a>