With a task configured to run WHEN SYSTEM$STREAM_HAS_DATA('ST1'), what happens if the stream has no data?

Master the SnowPro Advanced Architect Test with flashcards, multiple-choice questions, and detailed explanations. Prepare thoroughly for your certification!

Multiple Choice

With a task configured to run WHEN SYSTEM$STREAM_HAS_DATA('ST1'), what happens if the stream has no data?

Explanation:
A task with a WHEN clause uses that condition as a gate for execution. If the condition isn’t met, the task isn’t run for that cycle. Here, SYSTEM$STREAM_HAS_DATA('ST1') returns FALSE when the stream has no new changes to consume, so the WHEN predicate isn’t satisfied and the task is skipped for this run. It isn’t suspended or canceled; it will be evaluated again on the next scheduled execution. If data appears in the stream later, the condition will be TRUE and the task will run then.

A task with a WHEN clause uses that condition as a gate for execution. If the condition isn’t met, the task isn’t run for that cycle. Here, SYSTEM$STREAM_HAS_DATA('ST1') returns FALSE when the stream has no new changes to consume, so the WHEN predicate isn’t satisfied and the task is skipped for this run. It isn’t suspended or canceled; it will be evaluated again on the next scheduled execution. If data appears in the stream later, the condition will be TRUE and the task will run then.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy