Databricks-DE-Pro Monitoring and Alerting Practice Question
Exhibit
{
"alert": {
"name": "Data Freshness",
"query": "SELECT max(updated_at) FROM my_table",
"threshold": "now() - interval 1 hour"
}
}Refer to the exhibit. The alert is intended to trigger if the data in 'my_table' is older than one hour. Which query modification correctly implements this check?
⚠ Common exam trap
Candidates often struggle with SQL syntax for time intervals, accidentally choosing options that use incorrect date functions or fail to account for the 'CASE WHEN' logic required for binary alert triggers.
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
✓
SELECT CASE WHEN max(updated_at) < now() - interval 1 hour THEN 1 ELSE 0 END
To detect stale data, the alert must compare the latest record timestamp against the current time. If the latest 'updated_at' value is less than the threshold (one hour ago), it signifies that no data has arrived in the last hour. Monitoring data freshness is critical for time-sensitive analytics, ensuring that business stakeholders are working with current data and allowing teams to troubleshoot ingestion pipeline failures proactively.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
SELECT COUNT(*) FROM my_table WHERE updated_at < now() - interval 1 hour
Why it's wrong here
This query returns the count of old records, not whether the most recent data is stale. If the table has many historical records, this query will return a high value even if new data is being ingested perfectly, leading to false-positive alerts.
- ✓
SELECT CASE WHEN max(updated_at) < now() - interval 1 hour THEN 1 ELSE 0 END
Why this is correct
This query returns 1 if the latest data is older than one hour, allowing an alert threshold of '> 0' to trigger. This is a standard pattern for binary state alerting where the result set needs to indicate a violation condition clearly.
- ✗
SELECT updated_at FROM my_table ORDER BY updated_at DESC LIMIT 1
Why it's wrong here
This query returns the timestamp itself, not a boolean flag or a metric that can be easily compared to a constant in a standard threshold-based alert configuration, making it difficult to trigger a boolean 'Alert' state directly.
- ✗
SELECT datediff(now(), max(updated_at)) FROM my_table
Why it's wrong here
While this returns the difference in days, it is not ideal for hourly thresholds. Even with proper conversion, the result is a number representing a duration, and if the data is fresh, the result might be zero, which is harder to alert on than a boolean flag.
About these practice questions
Courseiva writes every Databricks-DE-Pro question from scratch — 267 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 →
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 Databricks exam blueprint
This Databricks-DE-Pro practice question is part of Courseiva's free Databricks 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 Databricks-DE-Pro exam.