High severityexecution
Power BI Refresh Error:
STALE_STREAM (Stream Staleness)
What does this error mean?
A Snowflake Stream has become stale — the change data captured by the stream is no longer available within the table's Time Travel retention period. Consuming a stale stream returns an error and data cannot be recovered.
Common causes
- 1The stream was not consumed (queried with DML) within the table's DATA_RETENTION_TIME_IN_DAYS window
- 2The table's Time Travel retention was reduced after the stream was created
- 3An ETL or task pipeline paused or failed, preventing regular stream consumption
- 4DATA_RETENTION_TIME_IN_DAYS is set to 0 on the source table, making streams stale almost immediately
- 5Stream consumer (Snowflake Task) was suspended and resumed after the retention window elapsed
How to fix it
- 1Check stream staleness: SELECT SYSTEM$STREAM_HAS_DATA('my_stream') and SELECT STALE FROM INFORMATION_SCHEMA.STREAMS WHERE STREAM_NAME = 'MY_STREAM'
- 2If the stream is stale, drop and recreate it — historical CDC data is unrecoverable: DROP STREAM my_stream; CREATE STREAM my_stream ON TABLE my_table
- 3Increase the source table's retention: ALTER TABLE my_table SET DATA_RETENTION_TIME_IN_DAYS = 14
- 4Ensure the consuming task or pipeline runs more frequently than the retention window
- 5Set up monitoring on stream staleness before it becomes unrecoverable — check STALE status daily