<?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: Debug UDFs using VSCode extension in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/debug-udfs-using-vscode-extension/m-p/82363#M36627</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115068"&gt;@SeyedA&lt;/a&gt;,&amp;nbsp;To resolve this, first, ensure your &lt;CODE&gt;SparkSession&lt;/CODE&gt; is properly initialized in your script. Be aware of the limitations of Databricks Connect, which might affect UDFs, and consider running UDFs locally in a simple Spark environment for debugging. If VSCode becomes too challenging, Databricks Notebooks offer a more integrated environment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you have any specific parts of your code that you’d like to share, I can help you troubleshoot further. How does that sound?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2024 11:09:50 GMT</pubDate>
    <dc:creator>Retired_mod</dc:creator>
    <dc:date>2024-08-08T11:09:50Z</dc:date>
    <item>
      <title>Debug UDFs using VSCode extension</title>
      <link>https://community.databricks.com/t5/data-engineering/debug-udfs-using-vscode-extension/m-p/82092#M36513</link>
      <description>&lt;P&gt;I am trying to debug my python script using Databricks VSCode extension. I am using udf and pandas_udf in my script. Everything works fine except when the execution gets to the udf and pandas_udf usages. It then complains that "&lt;SPAN&gt;SparkContext or SparkSession should be created first.". I did some research and looks like SparkContext is not supported in Databricks Connect (read &lt;A href="https://docs.databricks.com/en/dev-tools/databricks-connect/python/limitations.html" target="_blank"&gt;https://docs.databricks.com/en/dev-tools/databricks-connect/python/limitations.html&lt;/A&gt;). On the other hand I also found&amp;nbsp;&lt;A href="https://docs.databricks.com/en/dev-tools/databricks-connect/python/udf.html" target="_blank"&gt;https://docs.databricks.com/en/dev-tools/databricks-connect/python/udf.html&lt;/A&gt;&amp;nbsp;that says you can use UDFs with Databricks Connect. So I am confused. If you cannot debug UDFs with vscode extensions, how do you guys typically do this? Thanks for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2024 21:06:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/debug-udfs-using-vscode-extension/m-p/82092#M36513</guid>
      <dc:creator>SeyedA</dc:creator>
      <dc:date>2024-08-06T21:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Debug UDFs using VSCode extension</title>
      <link>https://community.databricks.com/t5/data-engineering/debug-udfs-using-vscode-extension/m-p/82363#M36627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115068"&gt;@SeyedA&lt;/a&gt;,&amp;nbsp;To resolve this, first, ensure your &lt;CODE&gt;SparkSession&lt;/CODE&gt; is properly initialized in your script. Be aware of the limitations of Databricks Connect, which might affect UDFs, and consider running UDFs locally in a simple Spark environment for debugging. If VSCode becomes too challenging, Databricks Notebooks offer a more integrated environment.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you have any specific parts of your code that you’d like to share, I can help you troubleshoot further. How does that sound?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 11:09:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/debug-udfs-using-vscode-extension/m-p/82363#M36627</guid>
      <dc:creator>Retired_mod</dc:creator>
      <dc:date>2024-08-08T11:09:50Z</dc:date>
    </item>
  </channel>
</rss>

