Streams and Tasks Flashcards
7 cards from real SNOWPRO CORE practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Streams and Tasks flashcards as text
What is a Snowflake Stream primarily used for?
Answer: Tracking DML changes (INSERT, UPDATE, DELETE) on a table for CDC workflows
Snowflake Streams track DML changes (inserts, updates, deletes) made to a source table, enabling change data capture (CDC) workflows downstream.
Which metadata columns are automatically included when querying a Snowflake Stream?
Answer: METADATA$ACTION, METADATA$ISUPDATE, METADATA$ROW_ID
Snowflake streams expose three metadata columns: METADATA$ACTION (INSERT or DELETE), METADATA$ISUPDATE (TRUE if the record is part of an update), and METADATA$ROW_ID (unique row identifier).
What happens to records in a Snowflake Stream after they are successfully consumed in a DML transaction?
Answer: The stream offset advances and those records are no longer visible in the stream
When a DML transaction that reads stream data commits successfully, the stream's offset pointer advances and the consumed change records are no longer visible — they have been 'consumed'.
When does a Snowflake Stream become stale and unusable?
Answer: When its offset falls outside the source table's DATA_RETENTION_TIME_IN_DAYS window
A stream becomes stale when its offset falls outside the source table's Time Travel retention period, because Snowflake can no longer reconstruct the historical data the stream depends on.
Which of the following Snowflake object types can have a stream created on it?
Answer: Tables, external tables, views (with limitations), and directory tables
Snowflake supports streams on standard tables, external tables, views (append-only), and directory tables for tracking file metadata changes on a stage.
In a Snowflake Stream, what does a row with METADATA$ACTION = 'DELETE' and METADATA$ISUPDATE = TRUE represent?
Answer: The pre-image (old values) of a row that was updated
An UPDATE produces two stream records: a DELETE with METADATA$ISUPDATE=TRUE (the old row values) and an INSERT with METADATA$ISUPDATE=TRUE (the new row values).
Which stream type in Snowflake captures ALL DML changes including inserts, updates, and deletes?
Answer: Standard (delta) stream
A standard stream (the default type) captures all DML operations — inserts, updates, and deletes — providing a complete changelog since the last offset advancement.