<?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: Issues executing notebook using custom databricks library uploaded in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4237432#M4545</link>
    <description>&lt;P&gt;Perfect, works perfectly in my test case... now to try it in my real world scenarios&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 17:44:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-10T17:44:24Z</dc:date>
    <item>
      <title>Issues executing notebook using custom databricks library uploaded</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4235380#M4523</link>
      <description>&lt;P&gt;I have been trying to process xml content using pyspark and dataframes as per the solution in the post&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/td-p/3515934" target="_blank" rel="noopener"&gt;https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/td-p/3515934&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am encoutering some execution errors in the notebook. As per the solution the first code element in the notebook is&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%%configure -f
{"conf": {"spark.jars.packages": "com.databricks:spark-xml_2-13-0.18.0"}}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Depending on how I exedcute this I get two different errors.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a) I connect to the spark instance first in the notebook. This takes 2 to 3 minutes to startup due to the loading of the custom environment with the databricks library. Then I execute the code fragment in the notebook:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SparkCoreError/UnexpectedSessionState: Livy session has failed. Error code: SparkCoreError/UnexpectedSessionState. SessionInfo.State from SparkCore is Error: Encountered an unexpected session state Dead while waiting for session to become Idle.  Error description: Spark_User_Requirements_IllegalArgumentException. Source: System.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;b) I execute the code fragment first which in turn connect to the spark instance using the custom environment. After 2 or 3 minutes I get this error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;invalidHttpRequestToLivy: [TooManyRequestsForCapacity] This spark job can't be run because you have hit a spark compute or API rate limit. To run this spark job, cancel an active Spark job through the Monitoring hub, choose a larger capacity SKU, or try again later. HTTP status code: 430 {Learn more} HTTP status code: 430.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a workaround? I can't imagine capacity is the real problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 14:41:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4235380#M4523</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-09T14:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issues executing notebook using custom databricks library uploaded</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4236571#M4535</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A simple workaround is to use Pandas to read data from the xml file into a Pandas dataframe, then convert the Pandas dataframe into a Spark dataframe. For example,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vjingzhanmsft_0-1728548009077.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1180840i808F1EF4902B9A8D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vjingzhanmsft_0-1728548009077.png" alt="vjingzhanmsft_0-1728548009077.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jing&lt;BR /&gt;&lt;EM&gt;If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos! &lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 08:16:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4236571#M4535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-10T08:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Issues executing notebook using custom databricks library uploaded</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4237432#M4545</link>
      <description>&lt;P&gt;Perfect, works perfectly in my test case... now to try it in my real world scenarios&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 17:44:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Issues-executing-notebook-using-custom-databricks-library/m-p/4237432#M4545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-10T17:44:24Z</dc:date>
    </item>
  </channel>
</rss>

