ADA-C01 Question 375
Single answerCreate alertsA Snowflake administrator needs to notify the operations team whenever a data ingestion process fails to load any rows into the SALES.RAW_ORDERS table during the last hour. The administrator wants a native Snowflake solution that checks the condition on a schedule and sends a notification only when the condition is met. Which approach should the administrator use?
- A
Create an ALERT object with a scheduled condition query that checks for zero rows loaded in the last hour, and define an action that calls a notification integration when the condition evaluates to TRUE.
- B
Create a TASK that runs every hour and automatically sends an email whenever the task completes, regardless of query results.
- C
Create a RESOURCE MONITOR on the warehouse used for ingestion and configure it to notify the operations team when no rows are loaded.
- D
Create a STREAM on SALES.RAW_ORDERS and configure the stream to send a notification when it detects no changes for one hour.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use a Snowflake ALERT. Alerts are intended for exactly this type of operational monitoring: a scheduled evaluation of a SQL condition followed by an action when that condition is true. In this scenario, the administrator can define a condition query that checks load activity for SALES.RAW_ORDERS over the last hour and an action that sends a notification through Snowflake's supported notification framework. This is more appropriate than a TASK because alerts natively encapsulate the pattern of condition-plus-action. RESOURCE MONITOR is unrelated because it governs credit consumption, and STREAM does not provide scheduling or notification capabilities by itself. Snowflake documentation for alerts describes creating alerts with a warehouse, schedule, condition, and action, making this the recommended native approach for proactive operational notifications.
- A. Correct.
Correct. A Snowflake ALERT is designed to evaluate a condition query on a schedule and execute an action only when the condition returns TRUE. This matches the requirement for a native Snowflake solution that periodically checks whether no rows were loaded in the last hour and then sends a notification through a supported notification mechanism.
- B. Incorrect.
Incorrect. A TASK can run on a schedule, but it does not inherently provide conditional alert semantics or automatic notification behavior simply because it completed. While a task could be used as part of a custom solution, this option does not satisfy the requirement as cleanly or directly as an ALERT and incorrectly implies automatic notification on completion.
- C. Incorrect.
Incorrect. RESOURCE MONITOR objects track and control credit usage for warehouses and accounts. They can trigger notifications based on consumption thresholds, not business conditions such as whether table loads inserted zero rows in a time window.
- D. Incorrect.
Incorrect. A STREAM tracks change data capture metadata for a table or view, but a stream does not itself schedule checks or send notifications. It can help identify changes, but it is not the native object used to evaluate a scheduled condition and notify when no qualifying rows were loaded.