<?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: Databricks Asset Bundle wrongfully deleting job in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124959#M47297</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/174604"&gt;@carolregatt&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;In general, jobs are deleted when you either change the job key or explicitly run bundle destroy.&lt;BR /&gt;The job key in the YAML file uniquely identifies the job. When you change the key, it breaks the existing binding, and DAB treats it as a completely new resource. This leads to the original job being deleted and a new one created.&lt;BR /&gt;To avoid this, it's best to keep the YAML key the same when managing an existing job, even if you're updating the job name.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Jul 2025 17:33:08 GMT</pubDate>
    <dc:creator>Advika</dc:creator>
    <dc:date>2025-07-11T17:33:08Z</dc:date>
    <item>
      <title>Databricks Asset Bundle wrongfully deleting job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124819#M47273</link>
      <description>&lt;DIV&gt;Hey so Ive just started to use DAB to automatically mange job configs via CICD&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I had a previously-existing job (lets say ID 123) which was created manually and had this config&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;resources:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; jobs:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; My_Job_A:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: My Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And I wanted to automatically mange it via DAB. So I created a local yaml file with this config, which changed the job name from My Job A to A Different Name for Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;targets:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; dev:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; resources:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; jobs:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My_Job_A:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: A Different Name for Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First I had to BIND this target with my existing job, so I ran&lt;/DIV&gt;&lt;DIV&gt;databricks bundle deployment bind My_Job_A 123 --target dev --auto-approve&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And then I was able to deploy the bundle&lt;/DIV&gt;&lt;DIV&gt;databricks bundle deploy --target dev&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And it WORKED! My remote job 123 was now called A Different Name for Job A, and all of its previous runs were maintained.&lt;/DIV&gt;&lt;DIV&gt;However, its remote config looked like&lt;/DIV&gt;&lt;DIV&gt;resources:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; jobs:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; A_Different_Name_for_Job_A:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; name: A Different Name for Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;and my local config still looked like&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;targets:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; dev:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; resources:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; jobs:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; My_Job_A:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: A Different Name for Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So I wrongfully though it would be best to have the keys matching between local and remote, so I change my local config to look exactly like the remote one:&lt;/DIV&gt;&lt;DIV&gt;targets:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; dev:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; resources:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; jobs:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A_Different_Name_for_Job_A:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name: A Different Name for Job A&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;HOWEVER, after deploying this change, my old job (ID 123) was DELETED and a new job (ID 456) was created in its place&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is this the expected behaviour?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This behaviour seems very dangerous since its not clear how job keys, job names and ids interact (or maybe Ive just not seen the documentation about it?), specially since its not possible to recover deleted jobs on my own&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 10 Jul 2025 16:45:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124819#M47273</guid>
      <dc:creator>carolregatt</dc:creator>
      <dc:date>2025-07-10T16:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundle wrongfully deleting job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124959#M47297</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/174604"&gt;@carolregatt&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;In general, jobs are deleted when you either change the job key or explicitly run bundle destroy.&lt;BR /&gt;The job key in the YAML file uniquely identifies the job. When you change the key, it breaks the existing binding, and DAB treats it as a completely new resource. This leads to the original job being deleted and a new one created.&lt;BR /&gt;To avoid this, it's best to keep the YAML key the same when managing an existing job, even if you're updating the job name.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 17:33:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124959#M47297</guid>
      <dc:creator>Advika</dc:creator>
      <dc:date>2025-07-11T17:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks Asset Bundle wrongfully deleting job</title>
      <link>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124961#M47298</link>
      <description>&lt;P&gt;Thanks so much for the response&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/152834"&gt;@Advika&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;That makes sense!&lt;/P&gt;&lt;P&gt;Can you explain why the remote config had a different key when compared to the local one? I guess that was what &lt;SPAN&gt;threw me off and made me want to change the local key to match the remote&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jul 2025 17:46:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/databricks-asset-bundle-wrongfully-deleting-job/m-p/124961#M47298</guid>
      <dc:creator>carolregatt</dc:creator>
      <dc:date>2025-07-11T17:46:19Z</dc:date>
    </item>
  </channel>
</rss>

