Skip to main content

SQL Alerts

Plan Restriction

Not available on the Free plan (see Pricing)

SQL Alerts are a powerful way to be notified about things proactively based on data in your database. Simply write a SQL query, set a schedule and specify a condition for the results. An email will be sent each time the condition is met.

SQL AlertSQL Alert

This can be useful for a lot of things, such as:

  • get notified when error rates spike or when similar unexpected things happen
  • get notified when your customers perform certain actions (e.g. when they start using a new feature)
  • get a brief overview every morning in your email inbox of events that happened the day before
  • setup data quality monitoring rules

You can specify the following options when creating or editing a SQL alert:

The Name and Description identifies the purpose of an alert.

The Trigger condition controls when the alert is triggered:

  • Query produces some rows: The alert triggers when the SQL query has at least one result row.
  • Query produces no rows: The alert triggers when the SQL query has no result rows.
  • Value greater/lower/equal/not-equal: The alert triggers when the comparison of a single numerical value from the SQL query result with the entered value succeeds. The alert also triggers in case the query produces unexpected results (no rows, or more rows/columns than just a single value).

The Alert schedule determines when/how frequently the alert query is run and the results evaluated:

  • Disabled: The alert is not run automatically, but can be triggered manually from the alerts overview page.
  • Run every x minutes/hours: The alert query is run with intervals of x minutes/hours between each run. For example, if the schedule is set to run every 24 hours and the alert is run immediately (e.g. by saving it), next run is scheduled 24 hours from now.
  • Run every day as hh:mm: The alert runs at a specific time-of-day. To run the alert query multiple times per day, use multiple values separated by comma. The format of each time-of-day is HH:MM (where HH stands for hours from 00-23 and MM stands for minutes from 00-59). The times are understood to be in the time zone specified in your organization preferences.

Send email to is the list of alert recipients, separated by comma.


If no emails are specified, the alert query is run, but no emails will be sent when the trigger condition is met.


You can also easily get the alerts delivered to Slack channels. See the instructions for Email Schedules.

Send email is used to control when an email is sent:

  • When triggered: An email is sent every time the trigger condition is met.
  • On change only: An email is sent only when the result of evaluating the trigger condition changes / toggles.
  • On all runs: An email is sent every time the alert is run, regardless of the trigger condition. The trigger condition only determines the email subject.

Datasource and Query specify the actual SQL query to run and the datasource to run it against.