Watching tasks, streams, and Snowpipe for health and data quality
Monitoring continuous pipelines in Snowflake means checking the health and progress of Snowpipe, Streams, Tasks, and Dynamic Tables using built-in views, table functions, and system functions rather than external tooling. Snowflake exposes both real-time status calls and historical Account Usage/Information Schema views so engineers can detect lag, failures, and stale data before they impact downstream consumers.
1 · Learn the must-know
- Use SYSTEM$
PIPE_STATUS('pipe_name') for real-time Snowpipe status (pendingFileCount, lastIngestedTimestamp, executionState) andCOPY_HISTORY(table function orACCOUNT_USAGEview) for detailed load history and errors. PIPE_USAGE_HISTORY(Account Usage) tracks Snowpipe credit consumption and bytes/files ingested over time for cost and throughput monitoring.- Task execution is monitored via the
TASK_HISTORYtable function/view (state,error_code,error_message,next_scheduled_time), andSERVERLESS_TASK_HISTORYtracks credits used by serverless tasks separately from warehouse-based ones. - For Streams, SHOW STREAMS exposes a STALE column and
stale_aftertimestamp, and SYSTEM$STREAM_HAS_DATA(stream_name) checks whether change data exists before consuming it, since an expired stream (past its retention/staleness window) must be recreated and loses change data. - Dynamic Tables expose refresh status and lag via
DYNAMIC_TABLE_REFRESH_HISTORYand SHOW DYNAMIC TABLES/INFORMATION_SCHEMA(data_timestamp,target_lag, actual latency), letting you confirm whether the configured target lag is being met. - Notification integrations can be attached to pipes and tasks (error notifications) so failures or backlog conditions trigger cloud messaging (e.g., SNS/Event Grid/Pub-Sub) instead of relying solely on manual polling.
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.