<?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: How to stop subsequent iterations in Databricks loop feature? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-stop-subsequent-iterations-in-databricks-loop-feature/m-p/93599#M38733</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/126180"&gt;@surajitDE&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Currently, there is no out of the box feature to achieve that. What you can do, is to try to implement notebook logic that in case of error will cancel for each task run using REST API or python sdk:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&lt;STRONG&gt;use&amp;nbsp;/api/2.1/jobs/runs/cancel&amp;nbsp;&lt;/STRONG&gt;endpoint passing run_id of for_each task that I want to cancel.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/api/workspace/jobs/cancelrun" target="_blank" rel="nofollow noopener noreferrer"&gt;Cancel a run | Jobs API | REST API reference | Databricks on AWS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2024 09:04:35 GMT</pubDate>
    <dc:creator>szymon_dybczak</dc:creator>
    <dc:date>2024-10-11T09:04:35Z</dc:date>
    <item>
      <title>How to stop subsequent iterations in Databricks loop feature?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-stop-subsequent-iterations-in-databricks-loop-feature/m-p/93586#M38732</link>
      <description>&lt;P&gt;How to stop subsequent iterations in Databricks loop feature? sys.exit(0) or dbutils.notebook.exit() only marks the current task and series of tasks in sequence as failed, but continues with subsequent iterations.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 07:41:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-stop-subsequent-iterations-in-databricks-loop-feature/m-p/93586#M38732</guid>
      <dc:creator>surajitDE</dc:creator>
      <dc:date>2024-10-11T07:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to stop subsequent iterations in Databricks loop feature?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-stop-subsequent-iterations-in-databricks-loop-feature/m-p/93599#M38733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/126180"&gt;@surajitDE&lt;/a&gt;&lt;/P&gt;&lt;P&gt;Currently, there is no out of the box feature to achieve that. What you can do, is to try to implement notebook logic that in case of error will cancel for each task run using REST API or python sdk:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&lt;STRONG&gt;use&amp;nbsp;/api/2.1/jobs/runs/cancel&amp;nbsp;&lt;/STRONG&gt;endpoint passing run_id of for_each task that I want to cancel.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/api/workspace/jobs/cancelrun" target="_blank" rel="nofollow noopener noreferrer"&gt;Cancel a run | Jobs API | REST API reference | Databricks on AWS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2024 09:04:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-stop-subsequent-iterations-in-databricks-loop-feature/m-p/93599#M38733</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-10-11T09:04:35Z</dc:date>
    </item>
  </channel>
</rss>

