CertSafari
    Databricks Certified Data Analyst Associate· Lessons

    Domain 6 · Lesson 29/39

    Alert notification destinations and templates in Databricks SQL

    Configure an alert with a desired threshold and destination.

    10 min read
    2.29% of exam
    4 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Send alert notifications to users and to admin-configured destinations such as Slack, Microsoft Teams or webhooks
    • Explain who can create a notification destination and how a Slack webhook destination is set up
    • Configure Notify on OK and a repeating notification frequency
    • Customize the notification subject and body with template variables in the standard or Markdown editor

    1.Users and notification destinations

    A threshold that nobody hears about is not much use, so the Notifications section of the alert editor sets who is told. An alert can notify individual users, found by searching for their username, or notification destinations, which are shared channels such as a Slack channel or a webhook endpoint. Users receive alerts by email.

    Only a workspace admin can create a destination, and once it exists every user can pick it. Analysts therefore cannot add a Slack channel themselves. If the channel is missing from the list, an admin has to add it under Settings → Notifications → Manage → +Add destination, choose a type, configure it and click Create. After that it appears for every alert author in the workspace. The admin can check the setup from the destination's three-dot menu with Test, which sends a sample notification.

    Destination types an admin can add, and what each needs
    Destination typeSetup notes
    EmailThe default; notifications go to user email addresses unless another destination is configured
    SlackGenerate an incoming webhook URL in Slack and paste it into the destination, or use the Databricks Genie app (Beta)
    Microsoft TeamsCan be connected through the Databricks Genie app (Beta), which supports SQL alerts
    WebhookHTTPS endpoint with a certificate from a trusted certificate authority; optional OAuth authentication (Beta)
    PagerDutySelected as a destination type when adding a destination

    Slack can be connected in two ways. The webhook route requires nothing beyond an incoming webhook URL from Slack. The Genie app route is in Beta. An admin must enable it on the Previews page, install the app and add it to the target channel before that channel can be selected. Webhook destinations have network requirements too. Databricks only sends over HTTPS, and the receiving endpoint must allowlist the workspace's control plane and data plane outbound IP addresses. If that allowlist is missing, the endpoint rejects the notifications.

    Checkpoint 1 of 5· Check yourself

    An analyst is building an alert and wants it to post to the team's Slack channel. The channel does not appear when they search in the alert's Notifications section. What has to happen before the analyst can pick it?

    Checkpoint 2 of 5· Exam question

    An analyst is setting up a Databricks SQL alert and wants failures to post directly into a team's Slack channel, but no Slack destination currently appears in the alert's Destination drop-down menu for the workspace. What must happen before the analyst can select a Slack option for this alert?

    Sources1

    2.When notifications are sent

    By default, a notification goes out when the alert triggers. In the tutorial alert, a Test condition result of OK means no notification is sent. Two settings change this. Notify on OK in Advanced settings sends a second message when the alert returns to OK. This tells the on-call channel the problem has cleared, so nobody has to open the alert page to check. Notification frequency in the Notifications section sends the triggered message again at an interval until the alert returns to OK.

    Choose based on how the alert will be used. A repeat frequency suits a condition someone has to act on, such as a failing data quality check, because it keeps sending until someone fixes it. For a noisy metric that recovers on its own, a single trigger plus Notify on OK gives a clear start and end without a flood of repeats. In the webhook payload and in bundle configuration, these settings appear together in a notification object holding notify_on_ok and the retrigger interval.

    Checkpoint 3 of 5· Check yourself

    A data quality alert fires when a table has rows with null customer IDs. The team wants the on-call channel to keep getting reminders until someone fixes the data. Which setting does this?

    Sources23

    3.Customizing the notification template

    Notifications use a default template unless you choose Customize template in Advanced settings. There are two editors. In the standard editor, you write variables as {{VARIABLE_NAME}} in the subject and body, for example Alert "{{ALERT_NAME}}" changed status to {{ALERT_STATUS}}., and you can use a fixed list of HTML tags. The Markdown editor has a formatting toolbar. There you write variables as @VARIABLE_NAME, and typing @ opens a variable picker.

    Template variables and where each can be used
    VariableContainsMarkdown editor
    ALERT_NAMEThe alert nameYes
    ALERT_STATUSThe evaluated alert statusYes
    ALERT_CONDITIONThe alert condition operatorYes
    ALERT_THRESHOLDThe alert thresholdYes
    ALERT_COLUMNThe alert column nameYes
    ALERT_URLThe alert page URLYes
    QUERY_RESULT_TABLEThe query result HTML table, first 100 rowsYes
    QUERY_RESULT_VALUEThe query result valueNo
    QUERY_RESULT_ROWSThe query result rowsNo
    QUERY_RESULT_COLSThe query result columnsNo

    How the message renders depends on the destination. HTML is rendered only by email destinations. A carefully built <table> will look fine in an inbox and arrive differently in Slack or at a webhook. Preview confirms that the variables are filled in. It does not show what a given destination will actually display.

    Aggregation also limits what the template can show. When the alert sums or averages a column, the query that actually runs is the wrapping aggregate. QUERY_RESULT_ROWS and QUERY_RESULT_COLS then hold only that final result, not the per-store breakdown. If recipients need the detail rows, compute the total inside the query and check it with the first-value setting. That way the original rows remain the result the template sees.

    Checkpoint 4 of 5· Check yourself

    A custom template in the standard editor builds an HTML table from {{ALERT_COLUMN}} and {{ALERT_THRESHOLD}}. Preview shows the variables filled in. The alert sends to one email user, a Slack destination and a webhook destination. What will the recipients see?

    Sources24

    4.What a webhook destination receives

    When an alert changes state, a webhook destination receives a JSON body. The service that sends a notification defines its payload, so the SQL alert payload is different from the payloads jobs send. The fields mirror the condition set in the editor, which is why the payload is useful for routing logic on the receiving side.

    Selected fields in the SQL alert webhook payload
    FieldMeaning
    comparison_operatorThe operator, such as GREATER_THAN, EQUAL, or IS_NULL
    thresholdThe value or query result column the source is compared against
    empty_result_stateState used when the query returns no rows; omitted if not defined
    notificationRetrigger interval, notify-on-OK setting, and destination IDs
    stateThe state that caused the notification: TRIGGERED, OK, or ERROR
    last_triggered_atLast triggered time in epoch milliseconds; omitted if never triggered

    Treat the receiving endpoint as sensitive. The payload can include the alert's SQL query, the owner's identity and any custom notification text. Anyone who can read stored payloads learns all of that, so restrict access to the endpoint and to its logs.

    Checkpoint 5 of 5· Match them up

    Match each field of the SQL alert webhook payload to the alert setting or outcome it carries, so a receiving service can route on it.

    Tap a term, then the definition that fits it.

    Sources31

    Practise it for real

    Create an alert on the sample NYC taxi data that triggers when the summed fare amount exceeds 4000 and notifies you every 5 minutes

    1. 1.Click Alerts in the sidebar, click Create Alert, paste a query over samples.nyctaxi.trips that groups SUM(fare_amount) AS amount by pickup date, and run it.

      Why: The alert owns its query, so you write it in the alert editor.

      You should see: One row per date with an amount column, newest date first.

    2. 2.In the compute selector, pick a SQL warehouse.

      Why: The selected warehouse runs the alert query on every evaluation.

      You should see: The status indicator shows whether the warehouse is running.

    3. 3.In Condition, choose Sum as the data value, amount as the column, > as the operator, and Static value 4000 as the threshold.

      Why: Sum aggregates all rows of amount, so the comparison uses the total rather than the newest day only.

      You should see: The condition reads as the sum of amount greater than 4000.

    4. 4.Click Test condition.

      Why: It checks whether the alert would trigger on the current data before you save it.

      You should see: The test shows the alert as triggered.

    5. 5.In Notifications, search for and select your username. Then open Edit schedule, set Every 5 minutes from 0 minutes past the hour, save, and click View alert.

      Why: This sets who is notified and how often the alert is evaluated.

      You should see: The alert page opens with an evaluation history, and because the sample data is static, you get an email notification on each run.

    Stuck? Get a nudge

    Change the aggregation from Sum to the first value and test again. This shows that only the top row is compared when no aggregation is set.

    Sources

    (4)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “You must be a Databricks workspace admin to manage notification destinations. After a destination is configured, it is available to all users.”
      ↩︎ Users and notification destinations
      “Paste the generated URL into your Databricks notification destination.”
      ↩︎ Users and notification destinations
      “Databricks enforces the use of HTTPS for security.”
      ↩︎ Users and notification destinations
      “The service that sends a notification defines the webhook payload.”
      ↩︎ What a webhook destination receives
      “You must be a Databricks workspace admin to manage notification destinations. After a destination is configured, it is available to all users.”
      ↩︎ Exam trap 1
    2. 2.
      “Notify on OK: Send a notification when the alert returns as OK.”
      ↩︎ When notifications are sent
      “Optionally, set a notification frequency to repeat notifications until the alert returns to OK.”
      ↩︎ When notifications are sent
      “In the standard editor, reference variables in the subject and body with {{VARIABLE_NAME}}.”
      ↩︎ Customizing the notification template
      “In the Markdown editor, reference variables with @VARIABLE_NAME.”
      ↩︎ Customizing the notification template
      “Only email notification destinations can render HTML.”
      ↩︎ Exam trap 2
      “The standard editor also supports HTML for formatting. Only email notification destinations can render HTML.”
      ↩︎ Checkpoint
    3. 3.
      “The retrigger interval, notify-on-OK setting, and notification destination IDs.”
      ↩︎ When notifications are sent
      “The payload can contain sensitive workspace metadata, including the SQL query, the alert owner's identity, and custom notification content.”
      ↩︎ What a webhook destination receives
      “The retrigger interval, notify-on-OK setting, and notification destination IDs.”
      ↩︎ Checkpoint
    4. 4.
      “those variables will only display the final, post-aggregation query result.”
      ↩︎ Customizing the notification template

    Ready to test yourself?

    Practise the 10 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.