<?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: Executing Notebooks - Run All Cells vs Run All Below in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12994#M7736</link>
    <description>&lt;P&gt;I second this request. It's odd that the behaviour is different when running all vs. running all below. Please make it consistent and document properly.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 12:06:22 GMT</pubDate>
    <dc:creator>pinecone</dc:creator>
    <dc:date>2022-08-15T12:06:22Z</dc:date>
    <item>
      <title>Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12987#M7729</link>
      <description>&lt;P&gt;Due to dependencies, if one of our cells errors then we want the notebook to &lt;U&gt;stop &lt;/U&gt;executing.&lt;/P&gt;&lt;P&gt;We've noticed some odd behaviour when executing notebooks depending on if "Run all cells in this notebook" is selected from the header versus "Run All Below".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example code below I've added an extra bracket to force the python to fail and raise an exception. If I run the notebook using "Run all cells in this notebook" then the exception is correctly thrown and the rest of the cells/commands in the notebook are skipped. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I use "Run All Below" then all cells are executed regardless of any exceptions or failures. We're tried using dbutils.notebook.exit but it doesn't work and subsequent cells are still run. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the intended behaviour? It's frustrating when trying to rerun just part of a notebook.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;U&gt;Example Code:&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Cmd 1&lt;/I&gt;&lt;/P&gt;&lt;P&gt;%python&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;spark.sql("""SELECT NOW()) AS force_error""")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;print("Error running SQL")&lt;/P&gt;&lt;P&gt;&amp;nbsp;raise Exception("Error running SQL")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Cmd  2&lt;/I&gt;&lt;/P&gt;&lt;P&gt;SELECT NOW())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;Cmd 3&lt;/I&gt;&lt;/P&gt;&lt;P&gt;SELECT NOW()&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 12:57:41 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12987#M7729</guid>
      <dc:creator>lei_armstrong</dc:creator>
      <dc:date>2021-10-19T12:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12989#M7731</link>
      <description>&lt;P&gt;That is how it works.  When you do 'run all', the cells after the error are skipped.&lt;/P&gt;&lt;P&gt;When you do run all below, they all get executed (and mostly throw an error).&lt;/P&gt;&lt;P&gt;Databricks probably has a reason for this behavior.  The notebook experience is not bad but certainly not perfect.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 15:11:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12989#M7731</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2021-10-19T15:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12990#M7732</link>
      <description>&lt;P&gt;Yes- this is expected behavior. Usually customers want all the cells to run regardless if one failed in between. Usually future cells will error our if they are dependent anyway. If you can suggest a feature that will provide that functionality I can make a feature request on your behalf.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 15:50:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12990#M7732</guid>
      <dc:creator>Dan_Z</dc:creator>
      <dc:date>2021-10-19T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12992#M7734</link>
      <description>&lt;P&gt;Thanks all for your responses, just seems strange the behaviour differs and isn't documented publicly (that I can find). Ideally it would be configurable as part of the notebook settings. I've raised a new feature request here : &lt;A href="https://feedback.azure.com/d365community/idea/c2240a09-8e31-ec11-a819-000d3ae2b5ca" alt="https://feedback.azure.com/d365community/idea/c2240a09-8e31-ec11-a819-000d3ae2b5ca" target="_blank"&gt;Notebook Settings for handling errors · Community (azure.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 10:12:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12992#M7734</guid>
      <dc:creator>lei_armstrong</dc:creator>
      <dc:date>2021-10-20T10:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12993#M7735</link>
      <description>&lt;P&gt;@Laura McGill​&amp;nbsp;, this question just came up again here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.databricks.com/s/question/0D53f00001PonToCAJ/executing-notebooks-run-all-cells-vs-run-all-below" target="test_blank"&gt;https://community.databricks.com/s/question/0D53f00001PonToCAJ/executing-notebooks-run-all-cells-vs-run-all-below&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I went ahead and created an internal feature request. You can refer to it with &lt;B&gt;DB-I-4250. &lt;/B&gt;If you'd like to help prioritize it, please contact your Account Executive or Customer Success Engineer and tell them your company needs &lt;B&gt;DB-I-4250&lt;/B&gt;. Being able to attach your company name to feature requests helps the product team prioritize them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 14:52:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12993#M7735</guid>
      <dc:creator>Dan_Z</dc:creator>
      <dc:date>2021-10-22T14:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12994#M7736</link>
      <description>&lt;P&gt;I second this request. It's odd that the behaviour is different when running all vs. running all below. Please make it consistent and document properly.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 12:06:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/12994#M7736</guid>
      <dc:creator>pinecone</dc:creator>
      <dc:date>2022-08-15T12:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Executing Notebooks - Run All Cells vs Run All Below</title>
      <link>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/80601#M36085</link>
      <description>&lt;P&gt;Has this been implemented? I have created a job using notebook. My notebook has 6 cells and if the code in first cell fails it should not run the rest of the cells&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 16:07:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/executing-notebooks-run-all-cells-vs-run-all-below/m-p/80601#M36085</guid>
      <dc:creator>sukanya09</dc:creator>
      <dc:date>2024-07-25T16:07:32Z</dc:date>
    </item>
  </channel>
</rss>

