<?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 Re: Asset Bundles Job If Condition in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93460#M38710</link>
    <description>&lt;P&gt;Okay i made it work with a variable, it was pretty easy. The variable accepted multiline text easily.&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;databricks.yml&lt;/P&gt;&lt;LI-CODE lang="java"&gt;targets:
  dev:
    mode: development
	...
    variables:
      notifications:
        default: 
          - user1@smth.com
          - user2@smth.com&lt;/LI-CODE&gt;&lt;P&gt;job:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;resources:
  jobs:
    Master_Load:
      name: Master Load
      email_notifications:
        on_failure:
          ${var.notifications}
        on_duration_warning_threshold_exceeded:
          ${var.notifications}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 15:04:00 GMT</pubDate>
    <dc:creator>kunex</dc:creator>
    <dc:date>2024-10-10T15:04:00Z</dc:date>
    <item>
      <title>Asset Bundles Job If Condition</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93433#M38704</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am trying to use Asset Bundles to deploy a job with email notifications active only on production environment.&lt;BR /&gt;I tried to use such if statement but it does not seem to do anything.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;resources:
  jobs:
    Master_Load:
      name: Master Load
      email_notifications:
        ${{ if eq(${var.env}, 'prd') }}:
          on_failure:
            - user1@smth.com
            - user2@smth.com&lt;/LI-CODE&gt;&lt;P&gt;Is it possible to even use if statements in a job definition?&lt;/P&gt;&lt;P&gt;Best!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 13:12:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93433#M38704</guid>
      <dc:creator>kunex</dc:creator>
      <dc:date>2024-10-10T13:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundles Job If Condition</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93442#M38705</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/125983"&gt;@kunex&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You don't have to use if condition. The recommended approach is to use define "shared" configuration at the top level resources mapping and then when you need environment specific configuration use targets top level-level mapping to override configuration.&lt;BR /&gt;&lt;SPAN&gt;The settings in the top-level&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/bundles/settings.html#bundle-syntax-mappings-workspace" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;workspace&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/bundles/settings.html#bundle-syntax-mappings-artifacts" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;artifacts&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;, and&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://docs.databricks.com/en/dev-tools/bundles/settings.html#bundle-syntax-mappings-resources" target="_blank" rel="noopener"&gt;&lt;SPAN class=""&gt;resources&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;mappings are used if they are not specified in a&amp;nbsp;targets&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;mapping, but any conflicting settings are overridden by the settings within a target.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1728569334806.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11785i6011641B8707F402/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1728569334806.png" alt="szymon_dybczak_0-1728569334806.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://docs.databricks.com/en/dev-tools/bundles/settings.html#targets" target="_blank" rel="noopener"&gt;Databricks Asset Bundle configuration | Databricks on AWS&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 14:09:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93442#M38705</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-10-10T14:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundles Job If Condition</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93456#M38709</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/110502"&gt;@szymon_dybczak&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here it is not that simple, it is not a simple variable but two emails starting with a dash thus i was wondering if i can use if statement, which was btw suggested incorrectly by chatgpt &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;As a walkaround i could use a variable based on a single email which would be a distribution group containing those people.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 14:46:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93456#M38709</guid>
      <dc:creator>kunex</dc:creator>
      <dc:date>2024-10-10T14:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Asset Bundles Job If Condition</title>
      <link>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93460#M38710</link>
      <description>&lt;P&gt;Okay i made it work with a variable, it was pretty easy. The variable accepted multiline text easily.&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;databricks.yml&lt;/P&gt;&lt;LI-CODE lang="java"&gt;targets:
  dev:
    mode: development
	...
    variables:
      notifications:
        default: 
          - user1@smth.com
          - user2@smth.com&lt;/LI-CODE&gt;&lt;P&gt;job:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;resources:
  jobs:
    Master_Load:
      name: Master Load
      email_notifications:
        on_failure:
          ${var.notifications}
        on_duration_warning_threshold_exceeded:
          ${var.notifications}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 15:04:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/asset-bundles-job-if-condition/m-p/93460#M38710</guid>
      <dc:creator>kunex</dc:creator>
      <dc:date>2024-10-10T15:04:00Z</dc:date>
    </item>
  </channel>
</rss>

