MetricSign
EN|NLRequest Access
Medium severityexecution

Power BI Refresh Error:
Time Travel query out of range

What does this error mean?

A Time Travel query or operation referenced a historical state of a table that is no longer within the DATA_RETENTION_TIME_IN_DAYS window. Snowflake cannot retrieve data older than the configured retention period.

Common causes

  • 1A query using AT(OFFSET => -N) or BEFORE(STATEMENT => ...) referenced a point in time older than DATA_RETENTION_TIME_IN_DAYS
  • 2A stream on a table consumed its offset so slowly that it fell outside the retention window (stale stream)
  • 3An automated Time Travel restore script ran too late after the data was deleted
  • 4The table's retention period was set to 0 (no Time Travel) and a historical query was attempted
  • 5An incremental pipeline using Time Travel-based change detection ran on a table with a 1-day retention in Enterprise edition

How to fix it

  1. 1Increase DATA_RETENTION_TIME_IN_DAYS on the table: ALTER TABLE t SET DATA_RETENTION_TIME_IN_DAYS = 7.
  2. 2For streams, ensure the stream is consumed before the retention window expires — check stream age with SELECT SYSTEM$STREAM_GET_TABLE_TIMESTAMP('stream_name').
  3. 3For recovery beyond the retention window, contact Snowflake Support to request a Fail-Safe restore (Enterprise+ only).
  4. 4Adjust automated Time Travel scripts to run within the retention window after any delete or update operation.
  5. 5For tables where historical queries are routine, set a longer retention period appropriate to the query look-back window.

Frequently asked questions

What is the default DATA_RETENTION_TIME_IN_DAYS in Snowflake?

The default is 1 day for Standard edition and up to 90 days for Enterprise edition. Account, database, schema, and table-level settings can override the default — the most specific setting wins.

What happens to a Snowflake Stream when the retention period is exceeded?

The stream becomes stale and all data in it is invalidated. You must re-create the stream and perform a full table scan to re-initialize the change tracking baseline.

Other execution errors