<?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 Using the %debug magic in DataBricks notebook in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25680#M17912</link>
    <description>&lt;P&gt;When developing locally, I can write %debug in a new cell after encountering an error, and jump into the function that the error originated from. In Databricks, this freezes the notebook indefinitely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;In [1]:&lt;/P&gt;&lt;P&gt;def query_data():&lt;/P&gt;&lt;P&gt;  df_full = query("SELECT * FROM mytable")&lt;/P&gt;&lt;P&gt;  df = df_full[df_full.mycolumn &amp;gt; 100]&lt;/P&gt;&lt;P&gt;  assert not df.empty&lt;/P&gt;&lt;P&gt;  return df&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query_data()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out [1]:  &lt;B&gt;AssertionError&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In [2] %debug&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;U&gt;(&lt;/U&gt;interactive prompt to explore df_full&lt;U&gt;)&lt;/U&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this functionality? I can get it in the Cloud Terminal, but that doesn't have the same python environment as my notebooks, so I can't really test things.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 09:39:26 GMT</pubDate>
    <dc:creator>327753</dc:creator>
    <dc:date>2022-10-26T09:39:26Z</dc:date>
    <item>
      <title>Using the %debug magic in DataBricks notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25680#M17912</link>
      <description>&lt;P&gt;When developing locally, I can write %debug in a new cell after encountering an error, and jump into the function that the error originated from. In Databricks, this freezes the notebook indefinitely.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;In [1]:&lt;/P&gt;&lt;P&gt;def query_data():&lt;/P&gt;&lt;P&gt;  df_full = query("SELECT * FROM mytable")&lt;/P&gt;&lt;P&gt;  df = df_full[df_full.mycolumn &amp;gt; 100]&lt;/P&gt;&lt;P&gt;  assert not df.empty&lt;/P&gt;&lt;P&gt;  return df&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;query_data()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Out [1]:  &lt;B&gt;AssertionError&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In [2] %debug&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;U&gt;(&lt;/U&gt;interactive prompt to explore df_full&lt;U&gt;)&lt;/U&gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get this functionality? I can get it in the Cloud Terminal, but that doesn't have the same python environment as my notebooks, so I can't really test things.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 09:39:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25680#M17912</guid>
      <dc:creator>327753</dc:creator>
      <dc:date>2022-10-26T09:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using the %debug magic in DataBricks notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25682#M17914</link>
      <description>&lt;P&gt;If I am reading my "compute" tab correctly we are using 10.4

To my knowledge, we have no reason not to upgrade, and now it looks like pdb would be a solid benefit. Any warnings before I try that upgrade?​&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screenshot of &amp;amp;#39;compute&amp;amp;#39; tab"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/1315iACE5AD7BFE7FFA2A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot of &amp;amp;#39;compute&amp;amp;#39; tab" alt="Screenshot of &amp;amp;#39;compute&amp;amp;#39; tab" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:37:31 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25682#M17914</guid>
      <dc:creator>327753</dc:creator>
      <dc:date>2022-10-31T09:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using the %debug magic in DataBricks notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25683#M17915</link>
      <description>&lt;P&gt;I just upgraded my personal node and %debug worked! I appreciate the reminder to use pdb() itself when appropriate too. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm still interested in whether we should have any concerns about upgrading our main cluster - please do let me know, and then I'll happily close out the question!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 10:11:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/using-the-debug-magic-in-databricks-notebook/m-p/25683#M17915</guid>
      <dc:creator>327753</dc:creator>
      <dc:date>2022-10-31T10:11:27Z</dc:date>
    </item>
  </channel>
</rss>

