<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to make different notifications based on target for alert as part of bundle in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/158899#M5326</link>
    <description>&lt;P&gt;My task is to make alert notification for prod target to pagerduty and e-mail, rest targets e-mail only.&lt;/P&gt;&lt;P&gt;It is very easy for job or pipeline. In target you may define something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks.yml
targets:
  prod:
    resources:
      jobs:
        main:
          webhook_notifications:
            on_failure:
              - id: "${var.pagerduty_notification_id}"&lt;/LI-CODE&gt;&lt;P&gt;But same approach does not work for alert. Alert requires 5 more fields like name etc despite they already defined in another "resources/some_file.alert.yml"&lt;/P&gt;&lt;P&gt;Using empty string raises error "Expected UUID, found".&lt;BR /&gt;Is there any way to do that ?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jun 2026 16:13:38 GMT</pubDate>
    <dc:creator>rvm1975</dc:creator>
    <dc:date>2026-06-12T16:13:38Z</dc:date>
    <item>
      <title>How to make different notifications based on target for alert as part of bundle</title>
      <link>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/158899#M5326</link>
      <description>&lt;P&gt;My task is to make alert notification for prod target to pagerduty and e-mail, rest targets e-mail only.&lt;/P&gt;&lt;P&gt;It is very easy for job or pipeline. In target you may define something like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;databricks.yml
targets:
  prod:
    resources:
      jobs:
        main:
          webhook_notifications:
            on_failure:
              - id: "${var.pagerduty_notification_id}"&lt;/LI-CODE&gt;&lt;P&gt;But same approach does not work for alert. Alert requires 5 more fields like name etc despite they already defined in another "resources/some_file.alert.yml"&lt;/P&gt;&lt;P&gt;Using empty string raises error "Expected UUID, found".&lt;BR /&gt;Is there any way to do that ?&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jun 2026 16:13:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/158899#M5326</guid>
      <dc:creator>rvm1975</dc:creator>
      <dc:date>2026-06-12T16:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to make different notifications based on target for alert as part of bundle</title>
      <link>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/158941#M5329</link>
      <description>&lt;P&gt;You can follow the same approach of using swapping out the subscriptions (alert subscriptions) based on the target for the alerts.&amp;nbsp;You can follow below &amp;amp; change the alert subscriptions based on targets&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Target Prod
     alert_subscriptions:
        - user_email: 'rvm@mosr.com'
        - pager_destination_id: 'a18db8fa-36ed-46d9-a085-6c3517daf232'​​

Target Rest
    alert_subscriptions:
        - user_email: 'rvm@mosr.com'​&lt;/LI-CODE&gt;&lt;P&gt;You can setup the alert as below. It stays completely target agnostic as it references the alert_subscriptions&amp;nbsp;setup earlier&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  alerts:
    aalerts:
      display_name: aalerts
      evaluation:
        comparison_operator: EQUAL
        source:
          name: '1'
        threshold:
          value:
            double_value: 2
        notification:
          notify_on_ok: false
          subscriptions: ${var.alert_subscriptions}
      query_text: select 2
      schedule:
        quartz_cron_schedule: '44 19 */1 * * ?'
        timezone_id: Europe/Amsterdam
      warehouse_id: 460a05ed&lt;/LI-CODE&gt;&lt;P&gt;You can use below to find UUID&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;w = WorkspaceClient()
destinations = w.notification_destinations.list()

for dest in destinations:
    print(dest)&lt;/LI-CODE&gt;&lt;P&gt;Ensure the alert file&amp;nbsp;containing alerts details is included under include in the yml.&amp;nbsp;Ensure the &lt;STRONG&gt;UUID&lt;/STRONG&gt; is sent for the pager duty as above to avoid the &lt;STRONG&gt;error "Expected UUID, found"&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jun 2026 16:48:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/158941#M5329</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-06-13T16:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to make different notifications based on target for alert as part of bundle</title>
      <link>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/159015#M5332</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt;&amp;nbsp;Thanks for the solution. Tested it and it's working. Totally forgot that variable can be list.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jun 2026 10:32:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/how-to-make-different-notifications-based-on-target-for-alert-as/m-p/159015#M5332</guid>
      <dc:creator>rvm1975</dc:creator>
      <dc:date>2026-06-15T10:32:49Z</dc:date>
    </item>
  </channel>
</rss>

