<?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 How can i set the workflow status to Skipped? in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/how-can-i-set-the-workflow-status-to-skipped/m-p/106144#M1818</link>
    <description>&lt;P&gt;I have a Python script workflow with 2 tasks: Task &lt;STRONG&gt;A&lt;/STRONG&gt; and Task &lt;STRONG&gt;B&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When task &lt;STRONG&gt;A&lt;/STRONG&gt; has data, this is shared to Task &lt;STRONG&gt;B&lt;/STRONG&gt; via &lt;STRONG&gt;createOrReplaceGlobalTempView&amp;nbsp;&lt;/STRONG&gt;with no issues.&lt;/P&gt;&lt;P&gt;The goal is: When &lt;STRONG&gt;A&lt;/STRONG&gt; has &lt;STRONG&gt;no&lt;/STRONG&gt; data, skip the Task &lt;STRONG&gt;B&lt;/STRONG&gt; and also set the workflow status to "&lt;STRONG&gt;Skipped&lt;/STRONG&gt;" like the image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iscpablogarcia_0-1737152423551.png" style="width: 323px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14204i90F379CBDADF5787/image-dimensions/323x143?v=v2" width="323" height="143" role="button" title="iscpablogarcia_0-1737152423551.png" alt="iscpablogarcia_0-1737152423551.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried several ways:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Tried &lt;STRONG&gt;dbutils.notebook.exit&lt;/STRONG&gt;("Skip this workflow, no data found in task A.") but this sets the status as Succeeded.&lt;/LI&gt;&lt;LI&gt;Tried assertions in Python but it's either Succeeded or Failed.&lt;/LI&gt;&lt;LI&gt;Tried if/else but it always throws Succeeded or Failed too.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is there a way to show in the workflow page the &lt;STRONG&gt;Skipped&lt;/STRONG&gt; status with the condition on Task A?&amp;nbsp;&lt;BR /&gt;.&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2025 22:29:53 GMT</pubDate>
    <dc:creator>iscpablogarcia</dc:creator>
    <dc:date>2025-01-17T22:29:53Z</dc:date>
    <item>
      <title>How can i set the workflow status to Skipped?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-can-i-set-the-workflow-status-to-skipped/m-p/106144#M1818</link>
      <description>&lt;P&gt;I have a Python script workflow with 2 tasks: Task &lt;STRONG&gt;A&lt;/STRONG&gt; and Task &lt;STRONG&gt;B&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When task &lt;STRONG&gt;A&lt;/STRONG&gt; has data, this is shared to Task &lt;STRONG&gt;B&lt;/STRONG&gt; via &lt;STRONG&gt;createOrReplaceGlobalTempView&amp;nbsp;&lt;/STRONG&gt;with no issues.&lt;/P&gt;&lt;P&gt;The goal is: When &lt;STRONG&gt;A&lt;/STRONG&gt; has &lt;STRONG&gt;no&lt;/STRONG&gt; data, skip the Task &lt;STRONG&gt;B&lt;/STRONG&gt; and also set the workflow status to "&lt;STRONG&gt;Skipped&lt;/STRONG&gt;" like the image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="iscpablogarcia_0-1737152423551.png" style="width: 323px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14204i90F379CBDADF5787/image-dimensions/323x143?v=v2" width="323" height="143" role="button" title="iscpablogarcia_0-1737152423551.png" alt="iscpablogarcia_0-1737152423551.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have tried several ways:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Tried &lt;STRONG&gt;dbutils.notebook.exit&lt;/STRONG&gt;("Skip this workflow, no data found in task A.") but this sets the status as Succeeded.&lt;/LI&gt;&lt;LI&gt;Tried assertions in Python but it's either Succeeded or Failed.&lt;/LI&gt;&lt;LI&gt;Tried if/else but it always throws Succeeded or Failed too.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is there a way to show in the workflow page the &lt;STRONG&gt;Skipped&lt;/STRONG&gt; status with the condition on Task A?&amp;nbsp;&lt;BR /&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2025 22:29:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-can-i-set-the-workflow-status-to-skipped/m-p/106144#M1818</guid>
      <dc:creator>iscpablogarcia</dc:creator>
      <dc:date>2025-01-17T22:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: How can i set the workflow status to Skipped?</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/how-can-i-set-the-workflow-status-to-skipped/m-p/106177#M1821</link>
      <description>&lt;P&gt;To achieve the goal of setting the workflow status to "Skipped" when Task A has no data, you can use the "Run if" conditional task type in Databricks Jobs. This allows you to specify conditionals for later tasks based on the outcome of other tasks.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.databricks.com/en/jobs/index.html#run-if-conditional-tasks" target="_blank"&gt;https://docs.databricks.com/en/jobs/index.html#run-if-conditional-tasks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Jan 2025 14:00:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/how-can-i-set-the-workflow-status-to-skipped/m-p/106177#M1821</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-01-18T14:00:56Z</dc:date>
    </item>
  </channel>
</rss>

