Courseiva
Data Engineering →mediumMultiple Choice

ARA-C01 Data Engineering Practice Question

Exhibit

CREATE TASK daily_sales_task
  WAREHOUSE = 'COMPUTE_WH'
  SCHEDULE = 'USING CRON 0 0 * * * UTC'
  WHEN SYSTEM$STREAM_HAS_DATA('sales_stream')
AS
  INSERT INTO sales_summary SELECT * FROM sales_stream;

Refer to the exhibit. What is the primary purpose of the WHEN clause in this Task definition?

⚠ Common exam trap

Candidates frequently mistake the WHEN clause for data filtering or row selection, rather than recognizing its role in conditional task scheduling and credit conservation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

To skip the task execution and avoid warehouse costs if no changes are present in the stream.

The WHEN clause in a Task allows for conditional execution based on a boolean expression. In this case, the SYSTEM$STREAM_HAS_DATA function checks if the associated stream contains any change tracking data. This prevents the Task from starting a warehouse and consuming credits when there is no work to perform.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    To ensure the Task only runs if the sales_summary table is empty.

    Why it's wrong here

    The WHEN clause evaluates the condition specified, which in this case is the state of a stream, not the row count of the target table. There is no native function in the WHEN clause specifically designed to check if a table is empty before execution.

  • ✗

    To check for the existence of the 'sales_stream' object before starting the warehouse.

    Why it's wrong here

    The SYSTEM$STREAM_HAS_DATA function does not just check for the existence of the object; it checks if the stream contains any transactional offsets (data changes). If the stream exists but is empty, the function returns false, and the task will skip its current execution.

  • ✓

    To skip the task execution and avoid warehouse costs if no changes are present in the stream.

    Why this is correct

    This is a critical cost-optimization technique. By evaluating the stream's data status before the warehouse is provisioned, Snowflake avoids spinning up compute resources for a task that has no data to process, effectively reducing unnecessary credit consumption in the automated pipeline.

  • ✗

    To validate that the data in the stream matches the schema of the sales_summary table.

    Why it's wrong here

    The WHEN clause is used for execution flow control, not for schema validation. Schema mismatches will result in an error at the time the INSERT statement is executed, but the WHEN clause cannot perform complex metadata comparisons or data quality checks on its own.

About these practice questions

Courseiva writes every ARA-C01 question from scratch — 209 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Snowflake exam blueprint

This ARA-C01 practice question is part of Courseiva's free Snowflake certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ARA-C01 exam.