<?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: If/else task branches in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/118908#M45740</link>
    <description>&lt;P&gt;For sure one solution is to package everything in a separate job. Other options?&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 13:50:41 GMT</pubDate>
    <dc:creator>vanagnostopoulo</dc:creator>
    <dc:date>2025-05-12T13:50:41Z</dc:date>
    <item>
      <title>If/else task branches</title>
      <link>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/118905#M45737</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an If/else task, say A and two other tasks B and C.&lt;/P&gt;&lt;P&gt;For the false outcome I would like to execute task B. For the true branch I would like to execute task C followed with task B. What is the correct way to express the dependencies of B on the conditional branches?&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 13:26:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/118905#M45737</guid>
      <dc:creator>vanagnostopoulo</dc:creator>
      <dc:date>2025-05-12T13:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: If/else task branches</title>
      <link>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/118908#M45740</link>
      <description>&lt;P&gt;For sure one solution is to package everything in a separate job. Other options?&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 13:50:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/118908#M45740</guid>
      <dc:creator>vanagnostopoulo</dc:creator>
      <dc:date>2025-05-12T13:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: If/else task branches</title>
      <link>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/119049#M45777</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/108954"&gt;@vanagnostopoulo&lt;/a&gt;!&lt;/P&gt;
&lt;P&gt;You can handle this using the “Run if” conditions in Databricks Jobs to control how tasks run based on different branches. Here’s how you can set it up:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Make Task B depend on both Task A (condition task) and Task C (true branch).&lt;/LI&gt;
&lt;LI&gt;Set Task B’s &lt;STRONG&gt;Run if&lt;/STRONG&gt; to “&lt;STRONG&gt;All done&lt;/STRONG&gt;”, this makes sure it runs after both A and C finish, no matter if they succeed or fail.&lt;/LI&gt;
&lt;LI&gt;For Task C, set its &lt;STRONG&gt;Run if&lt;/STRONG&gt; to “&lt;STRONG&gt;All succeeded&lt;/STRONG&gt;” on Task A, that way, it only runs when Task A succeeds and the condition evaluates to true.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So if Task A evaluates to false, Task B will run right after Task A. If it’s true, Task B will wait until Task C finishes before running. This setup keeps things clean and avoids needing to split tasks into a separate job.&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 12:32:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/if-else-task-branches/m-p/119049#M45777</guid>
      <dc:creator>Advika</dc:creator>
      <dc:date>2025-05-13T12:32:34Z</dc:date>
    </item>
  </channel>
</rss>

