apache/superset · error · AlertQueryError
An error occurred when running alert query
Error message
An error occurred when running alert query
What it means
Error "An error occurred when running alert query" thrown in apache/superset.
Source
Thrown at superset/commands/report/alert.py:274
(stop - start) * 1000.0,
)
return df
except SoftTimeLimitExceeded as ex:
logger.warning("A timeout occurred while executing the alert query: %s", ex)
raise AlertQueryTimeout() from ex
except ReportScheduleExecutorNotFoundError:
# A missing executor user is a configuration problem, not a transient
# query error; surface the typed error rather than masking it.
raise
except AlertQueryError:
# Re-raise the typed validation/authorization errors as-is instead
# of masking them behind the generic error below.
raise
except Exception as ex:
logger.warning("An error occurred when running alert query")
# The exception message here can reveal to much information to malicious
# users, so we raise a generic message.
raise AlertQueryError(
message=_("An error occurred when running alert query")
) from ex
def validate(self) -> None:
"""
Validate the query result as a Pandas DataFrame
"""
# When there are transient errors when executing queries, users will get
# notified with the error stacktrace which can be avoided by retrying
df = retry_call(
self._execute_query,
exception=AlertQueryError,
max_tries=app.config["ALERT_REPORTS_QUERY_EXECUTION_MAX_TRIES"],
)
if df.empty and self._is_validator_not_null:
self._result = None
returnView on GitHub (pinned to f4587218dd)
Solutions
- Run the alert SQL manually in SQL Lab to see the underlying database error.
- Check server logs for the exception raised while running the alert query.
When it happens
Trigger: An unexpected error occurs while executing the alert query.
Common situations: Running an alert query that fails at the database (syntax error, missing table, connection failure).
AI-assisted analysis of apache/superset@f4587218dd (2026-08-14).
Data as JSON: /api/errors/bbaf8a00dd315be8.
Report an issue: GitHub.