ARA-C01 · Question #137
The following DDL command was used to create a task based on a stream: Assuming MY_WH is set to auto_suspend ?60 and used exclusively for this task, which statement is true?
The correct answer is B. The warehouse MY_WH will only be active when there are results in the stream. When a task is created with a WHEN SYSTEM$STREAM_HAS_DATA() condition, Snowflake's scheduler checks the stream at the defined schedule interval, but it only actually executes the task (and therefore wakes the warehouse) when the stream contains unconsumed change data. If the…
Question
The following DDL command was used to create a task based on a stream:
Assuming MY_WH is set to auto_suspend ?60 and used exclusively for this task, which statement is true?
Exhibit
Options
- AThe warehouse MY_WH will be made active every five minutes to check the stream.
- BThe warehouse MY_WH will only be active when there are results in the stream.
- CThe warehouse MY_WH will never suspend.
- DThe warehouse MY_WH will automatically resize to accommodate the size of the stream.
How the community answered
(37 responses)- B92% (34)
- C3% (1)
- D5% (2)
Explanation
When a task is created with a WHEN SYSTEM$STREAM_HAS_DATA() condition, Snowflake's scheduler checks the stream at the defined schedule interval, but it only actually executes the task (and therefore wakes the warehouse) when the stream contains unconsumed change data. If the stream is empty, no SQL is sent to the warehouse, so the warehouse never activates. Option A is incorrect because the warehouse does not activate every five minutes just to check the stream-the check is done by the Snowflake service itself. Option C is incorrect because the warehouse will eventually suspend (based on auto_suspend = 60 seconds) after each task run completes. Option D is incorrect because Snowflake tasks do not auto-resize warehouses.
Topics
Community Discussion
No community discussion yet for this question.
