Loading the documentation…
An alert is a SQL query that runs on a schedule and emails people when its conditions are met. Create one when people need to hear about a change in your data without opening the Editor themselves.
To create an alert that emails only you, you need Create Alerts, which the Alert Creator preset includes. To add other people, roles or email addresses as recipients, you also need Notify Others with Alerts, which the Alert Manager preset includes. See Permission reference for every preset.
Either permission shows the New alert button. Without Notify Others with Alerts, the Recipients card has no Roles or Email addresses field and People lists only you; the card reads You can only send alerts to yourself.
You cannot create or change an alert while you are viewing DataMind OS as another user. See Impersonate a user.
Write and check the query in the Editor first. See Write and check SQL.
Runs as is the role whose access the query uses. The list shows the roles you hold, or every role if you hold the admin role. Changing Runs as on a saved alert needs the new role as well.
Test runs the query with the access of the role in Runs as. It saves nothing and emails no one. Saving runs the same checks as Test. A new alert shows Pending until its first run. Preview email opens the exact email the alert would send; after you edit the draft, the preview is out of date until you run Test again.
A card that hides a problem is marked Needs attention: open it to see the message under the field, for example Name is required or Pick at least one role, person or email address.
Clicking outside the editor does not close it, so a half-written query is safe. Close the editor with Cancel or the close button. If the alert in the address no longer exists, the editor shows Alert not found with Back to alerts.
Trigger has two modes:
In a rule-based alert, click Add rule. A new rule starts as Rows matching with Any. Each rule has one of these kinds:
| Rule kind | What it checks |
|---|---|
| Row count | The number of rows the query returns, for example greater than 100. |
| Aggregate | First value of, Minimum of, Maximum of, Sum of, Average of or Distinct count of a column, compared with a value. |
| Rows matching | Whether Any, No or Every row has a column that meets a condition. |
| Always | Every run counts as a match. |
The conditions you can pick depend on the column's type:
Enter dates as YYYY-MM-DD. Before your first Test, the editor offers every condition, and you type the column name yourself. After Test, you pick the column from a list of the query's columns. A rule that needs no value hides its Value box: Always, is empty (NULL) and is not empty.
With two or more rules, Trigger when appears. All rules triggers when every rule matches. Any rule triggers when at least one matches. After Test, each rule shows its value and a tick or a cross.
A rule-based alert needs at least one rule before you can save it. With no rules yet, the section reads No rules yet. If you switch it back to Query based, its rules are kept but not applied.
Runs is Daily, Weekdays, Weekly or Monthly. Weekly asks for a Day, from Monday to Sunday. Monthly asks for a Day of month, from 1 to 31. Shorter months run on their last day. The alert runs at its Time on every day Runs includes; schedules are checked every minute. A time that is not a valid 24-hour value shows Use a 24-hour HH:mm time, and a monthly day outside 1 to 31 shows Pick a day from 1 to 31.
Time and the day are read in the alert's Timezone. A new alert starts on your browser's time zone, and the field reads as a sentence, for example Runs in Tokyo time (GMT+9), the same as your clock. When the alert's time zone differs from yours, the sentence also shows the time on your own clock, for example 09:00 there is 08:00 for you., with the day before or the next day when the day differs.
To use another time zone, click Change and type a city or country. Each row shows the time there now and its offset. Before you type, Suggested lists your time zone and UTC. Changing the time zone keeps the time you typed: 09:00 stays 09:00, now read in the new zone. Editing an alert keeps the time zone it was saved with, and an alert saved before Timezone existed keeps running at the same moment, with the editor showing the time zone it uses.
The alert list's Schedule column and the details panel name the time zone, for example Daily at 09:00 Tokyo time, Sundays at 18:30 UTC or Monthly on day 31 at 09:00 UTC.
Under Schedule, Email controls when emails go out:
A failed run never sends an email.
An address that is not valid is not added and shows Enter a valid email address; one already in the list shows This address is already added. Addresses are not case-sensitive. An alert holds up to 50 addresses (Add up to 50 email addresses). DataMind sends to a typed address as it is and does not check that the mailbox exists.
You need at least one role, person or email address (Pick at least one role, person or email address). Each address receives the email once, even when a typed address is also a picked person's address. Deactivated users are skipped, and a deactivated role reaches nobody.
[{{status}}] {{alert_name}}. The variables are {{alert_name}}, {{status}}, {{value}}, {{row_count}} and {{run_at}}. {{status}} becomes TRIGGERED or BACK TO NORMAL, {{value}} is the first value a rule produced, and {{run_at}} is the run time in the alert's time zone. In Preview email after Test, {{run_at}} shows the server's time zone. A variable the alert does not know stays as you typed it.failed-card-transactions. xlsx.Until you run Test, the Columns field is disabled and every column is used. An empty subject is refused with The email needs a subject, and a row limit outside 1 to 100 with Show between 1 and 100 rows.
| Setting | What it does | Default |
|---|---|---|
| Name | Names the alert in the list and in its attachment. | Empty, required |
| Runs as | The role whose access the query uses. | Empty, required |
| Trigger | Query based or Rule based. | Query based |
| Trigger when | All rules or Any rule, shown with two or more rules. | All rules |
| Runs | How often the alert runs. | Daily |
| Day or Day of month | The weekday for a weekly alert, or the day for a monthly one. | Monday, or 1 |
| Time | The time of day, in 24-hour format, read in the alert's Timezone. | 09:00 |
| Timezone | The time zone that Time and the day are read in. Click Change and search by city or country. Changing it keeps the time you typed. | Your browser's time zone |
| Email (under Schedule) | When emails go out. | When it changes |
| Roles, People and Email addresses | Who receives the email. | Empty, at least one required |
| Subject | The email subject. | [{{status}}] {{alert_name}} |
| Note above the table | Text above the rows. | Empty |
| Rows | Whether the email includes a table. | Include rows |
| Row limit | The number of rows in the table. | 10 |
| Which rows | Matching rows or First rows, rule-based alerts only. | Matching rows |
| Columns | The columns in the table. | Every column |
| Attach the rows as a file | The attachment type. | No file |
Europe/ Berlin runs at 09:00 Berlin time in summer and in winter. A time that is skipped when the clocks go forward runs an hour later, and a time that repeats when they go back runs once.So it keeps working after its author leaves. The query uses the role's access, not yours.
An alert can read only the Lake and Warehouse data of its Runs as role. Ask an administrator to add you to the role that owns those tables, or change the query so it reads only that role's data.
The list shows only roles you hold. Ask an administrator to add you to the role, or ask them to create the alert.
Query based triggers whenever the query returns at least one row. Rule based triggers only when your rules match, for example a Row count greater than 100.
The column list fills from your last Test. Click Test first, or type the column name.
Only with Every match. With When it changes, you get one email when the condition starts being met and one when it is back to normal.
The alert's own Timezone, which starts on your browser's time zone for a new alert. Open the alert, then Schedule: the sentence under Timezone names the zone and, when it differs from yours, shows the time on your own clock. Click Change to pick another zone.
Yes, if you hold Notify Others with Alerts. Pick the team's role in Roles. Everyone in that role when the email goes out receives it.
Yes, if you hold Notify Others with Alerts. Under Recipients, type the address in Email addresses, for example the address of a distribution list, and press Enter. The address does not need a DataMind account, and the mail group delivers the email to its members.
No. Test runs the query and shows the verdict. Preview email shows the exact email the alert would send. Nothing is sent and nothing is saved.
The alert runs on that month's last day instead. Day 31 runs on 28 February, or 29 February in a leap year.
The bar reads Changed since this test - run it again and hides the rule results, and an open Preview email is out of date. Run Test again to refresh both.