<?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: run_if condition to handle prior task excluded? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/run-if-condition-to-handle-prior-task-excluded/m-p/156201#M54385</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/96188"&gt;@ChristianRRL&lt;/a&gt;&amp;nbsp; !&lt;/P&gt;&lt;P&gt;You are totally righy. With the current DBKS dependency semantics, a downstream task cannot run when all of its direct upstream dependencies are excluded&amp;nbsp;regardless of the run_if option. If you check the doc it explicitly says (I am quoting here) "if all task dependencies are excluded, the task is also excluded, regardless of its run if condition." It also says excluded upstream tasks are treated as successful only when evaluating run_if&amp;nbsp;but that rule does not help when all dependencies are excluded.&lt;/P&gt;&lt;P&gt;IMHO, your workaround is correct and you can add a second upstream dependency that is not excluded&amp;nbsp;for example the condition task like Should_Run_Silver.&lt;/P&gt;&lt;P&gt;However, I would suggest using None failed instead of At least one succeeded for the curated tasks.&lt;/P&gt;&lt;P&gt;Why ? because if silver succeeds&amp;nbsp; the curated runs and if it&amp;nbsp;is excluded but Should_Run_Silver succeeded you will also have curated running and if silver fails the curated does not run.&lt;/P&gt;&lt;P&gt;With At least one succeeded, the curated task could still run even if the silver task failed because Should_Run_Silver succeeded.is common branching pattern.&lt;/P&gt;</description>
    <pubDate>Tue, 05 May 2026 20:51:18 GMT</pubDate>
    <dc:creator>amirabedhiafi</dc:creator>
    <dc:date>2026-05-05T20:51:18Z</dc:date>
    <item>
      <title>run_if condition to handle prior task excluded?</title>
      <link>https://community.databricks.com/t5/data-engineering/run-if-condition-to-handle-prior-task-excluded/m-p/156192#M54384</link>
      <description>&lt;P&gt;Hi there, I kind of know the answer here but want to check in case I'm missing anything (or else maybe vent slightly and hope for new functionality in the future).&lt;/P&gt;&lt;P&gt;Basically, I'm looking for a way to run a task if either (A) the prior step ran successfully, or (B) the prior step was excluded. However, based on available documentation, this doesn't seem to be possible because:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/jobs/run-if#run-if-condition-options" target="_self"&gt;Configure task dependencies | run-if-condition-options&lt;/A&gt;&lt;UL&gt;&lt;LI&gt;"If all task dependencies are excluded, the task is also excluded, regardless of its&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Run if&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;condition."&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Here is an example highlighting this. As per the documentation, regardless of which run_if condition I use (All succeeded, At least one succeeded, None Failed, All done), because the prior step is excluded the following step is also excluded:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristianRRL_1-1778008957285.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/26655iE9B5558C9F35AA6C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristianRRL_1-1778008957285.png" alt="ChristianRRL_1-1778008957285.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This leads me to the following configuration because existing functionality doesn't seem to support the simpler behavior I'm looking for:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChristianRRL_2-1778009198388.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/26656i2EF8BF5A16AD3222/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChristianRRL_2-1778009198388.png" alt="ChristianRRL_2-1778009198388.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Let me know if I'm missing anything, or is there really no way to a task if the prior task has been excluded? If so, can I request for this functionality to be added in the future?&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 19:29:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/run-if-condition-to-handle-prior-task-excluded/m-p/156192#M54384</guid>
      <dc:creator>ChristianRRL</dc:creator>
      <dc:date>2026-05-05T19:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: run_if condition to handle prior task excluded?</title>
      <link>https://community.databricks.com/t5/data-engineering/run-if-condition-to-handle-prior-task-excluded/m-p/156201#M54385</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/96188"&gt;@ChristianRRL&lt;/a&gt;&amp;nbsp; !&lt;/P&gt;&lt;P&gt;You are totally righy. With the current DBKS dependency semantics, a downstream task cannot run when all of its direct upstream dependencies are excluded&amp;nbsp;regardless of the run_if option. If you check the doc it explicitly says (I am quoting here) "if all task dependencies are excluded, the task is also excluded, regardless of its run if condition." It also says excluded upstream tasks are treated as successful only when evaluating run_if&amp;nbsp;but that rule does not help when all dependencies are excluded.&lt;/P&gt;&lt;P&gt;IMHO, your workaround is correct and you can add a second upstream dependency that is not excluded&amp;nbsp;for example the condition task like Should_Run_Silver.&lt;/P&gt;&lt;P&gt;However, I would suggest using None failed instead of At least one succeeded for the curated tasks.&lt;/P&gt;&lt;P&gt;Why ? because if silver succeeds&amp;nbsp; the curated runs and if it&amp;nbsp;is excluded but Should_Run_Silver succeeded you will also have curated running and if silver fails the curated does not run.&lt;/P&gt;&lt;P&gt;With At least one succeeded, the curated task could still run even if the silver task failed because Should_Run_Silver succeeded.is common branching pattern.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2026 20:51:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/run-if-condition-to-handle-prior-task-excluded/m-p/156201#M54385</guid>
      <dc:creator>amirabedhiafi</dc:creator>
      <dc:date>2026-05-05T20:51:18Z</dc:date>
    </item>
  </channel>
</rss>

