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 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 warehouse MY_WH will only be active when there are results in the stream. The command CREATE TASK uses a WHEN clause with SYSTEM$STREAM_HAS_DATA('MYSTREAM') to check for new data in the stream. This means the task will only trigger and use the warehouse if there is data to process, hence the warehouse will not be made active every five minutes just to check the stream.
Should be B
Stream_has_data is a metadata operation, so you don't need a wh to call it. B is correct, the WH will start as soon as there are data in the STREAM
the warehouse will be triggered if condition STREAM_HAS_DATA meet
Not true, B would be correct. Warehouse is only started if condition is met: https://docs.snowflake.com/en/sql-reference/sql/create-task https://docs.snowflake.com/en/sql-reference/functions/system_stream_has_data
Answer is B and is validated
B is correct.