QuestionQ271

VerifiedMonitoring and Alerting

The data engineering team configured a Databricks SQL query and alert to monitor values in a Delta Lake table. The recent_sensor_recordings table contains an identifying sensor_id, along with the timestamp and temperature for recordings from the most recent 5 minutes.

The following query creates the alert:

Question Image

The query refreshes every minute and always finishes in under 10 seconds. The alert triggers when mean(temperature) > 120. Notifications are configured to be sent no more than once every minute.

If the alert sends notifications for 3 consecutive minutes and then stops, which statement must be true?

Explanation

GROUP BY sensor_id calculates MEAN(temperature) separately for each sensor. A triggered mean-temperature condition therefore indicates that, on each of the three relevant executions, at least one sensor had an average temperature above 120. It does not represent a single average across all sensors. Databricks SQL GROUP BY groups rows by the specified expressions and computes aggregate functions for each group.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!