<?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: Spark XML does not work with pyspark in Data Engineering</title>
    <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3517291#M1960</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try to&amp;nbsp;upload the .jar file in library management, and install it then use in notebook?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vnikhilanmsft_0-1699260007446.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/992202iE584F087708CA2D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vnikhilanmsft_0-1699260007446.png" alt="vnikhilanmsft_0-1699260007446.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please upload the .jar file here and try running the pyspark code.&lt;BR /&gt;Hope this helps. Please let us know if you have any further questions.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2023 08:41:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-11-06T08:41:26Z</dc:date>
    <item>
      <title>Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3515934#M1958</link>
      <description>&lt;P&gt;Has anyone been able to read XML files in a notebook using pyspark yet? I loaded the&amp;nbsp;&lt;SPAN&gt;spark-xml_2.12-0.16.0.jar library and am trying to run the below code, but it does not seem to recognize the package. I have the same configuration in an azure synapse notebook and it works perfectly.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The interesting thing is that this does work in Fabric if I read the xml file using scala instead.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I just tried this on the new 2.2 runtime as well and no luck.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df = spark.read.&lt;/SPAN&gt;&lt;SPAN&gt;format&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;"xml"&lt;/SPAN&gt;&lt;SPAN&gt;).option(&lt;/SPAN&gt;&lt;SPAN&gt;"rowTag"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"BillOfLading"&lt;/SPAN&gt;&lt;SPAN&gt;).load(&lt;/SPAN&gt;&lt;SPAN&gt;"Files/Freight/kls/raw/KACC20230724.xml"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Error:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class=""&gt;Py4JJavaError&lt;/SPAN&gt;&lt;SPAN&gt;: An error occurred while calling o5568.load. : org.apache.spark.SparkClassNotFoundException: [DATA_SOURCE_NOT_FOUND] Failed to find the data source: xml. Please find packages at `&lt;A href="https://spark.apache.org/third-party-projects.html" target="_blank" rel="noopener"&gt;https://spark.apache.org/third-party-projects.html&lt;/A&gt;`.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 04 Nov 2023 17:55:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3515934#M1958</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2023-11-04T17:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3515972#M1959</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for using Fabric Community.&lt;/P&gt;
&lt;P&gt;Apologies for the issue you have been facing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We are reaching out to the internal team to get more information related to your query and will get back to you as soon as we have an update.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Appreciate your patience.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 18:54:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3515972#M1959</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-04T18:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3517291#M1960</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please try to&amp;nbsp;upload the .jar file in library management, and install it then use in notebook?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vnikhilanmsft_0-1699260007446.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/992202iE584F087708CA2D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vnikhilanmsft_0-1699260007446.png" alt="vnikhilanmsft_0-1699260007446.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please upload the .jar file here and try running the pyspark code.&lt;BR /&gt;Hope this helps. Please let us know if you have any further questions.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 08:41:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3517291#M1960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-06T08:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3517346#M1961</link>
      <description>&lt;P&gt;That is where I have been loading it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 09:16:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3517346#M1961</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2023-11-06T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3518942#M1962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please share your workspace id, artifact id ? We'd like to check if it's our issue or hit the error by design.&amp;nbsp;It will be great if you can also share the code snippet along with it. We would like to understand why there is an issue?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You can send us this information through email to&amp;nbsp;AzCommunity[at]Microsoft[dot]com&amp;nbsp;with the below details,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Email subject: &amp;lt;Attn - v-nikhilan-msft &amp;nbsp;:&lt;SPAN class=""&gt;Spark XML does not work with pyspark&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 02:56:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3518942#M1962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-07T02:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3520177#M1963</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&lt;/a&gt;, I have emailed all of the requested details. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 14:51:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3520177#M1963</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2023-11-07T14:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3520508#M1964</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Thanks for providing the information. I have given the details to the internal team. I will update you once I hear back from them. &lt;BR /&gt;Appreciate your patience.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2023 17:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3520508#M1964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-07T17:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3527089#M1965</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To use&amp;nbsp;PySpark&amp;nbsp;in order to play with&amp;nbsp;XML files, we have to use spark-xml package&amp;nbsp;&lt;A href="https://github.com/databricks/spark-xml" target="_blank" rel="noopener"&gt;Link1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Try using the Scala API&lt;/P&gt;
&lt;PRE class=""&gt;&lt;CODE class=""&gt;&lt;SPAN class=""&gt;%%spark&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;val&amp;nbsp;df&amp;nbsp;=&amp;nbsp;spark.read&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.format("com.databricks.spark.xml")&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.option("rowTag",&amp;nbsp;"book")&lt;BR /&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.load("file:///synfs/nb_resource/builtin/demo.xml")&lt;BR /&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;df.show(10)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;You can find the tutorial here:&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://medium.com/@uzzaman.ahmed/working-with-xml-files-in-pyspark-reading-and-writing-data-d5e570c..." target="_blank" rel="noopener"&gt;Link2&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So basically, the format must be .format("com.databricks.spark.xml").&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 07:13:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3527089#M1965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-10T07:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3527112#M1966</link>
      <description>&lt;P&gt;I have already installed that package. The code you provided is scala, which does work. Pyspark does not work though.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 07:26:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3527112#M1966</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2023-11-10T07:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535131#M1967</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Apologies for the delay in response.&lt;/P&gt;
&lt;P&gt;I would request you to please&amp;nbsp;go ahead with Microsoft support for this. Please raise a support ticket on this link:&amp;nbsp;&lt;A href="https://support.fabric.microsoft.com/en-US/support/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://support.fabric.microsoft.com/en-US/support/&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Also once you have opened the support ticket , please do share the supportcase# here so that we can keep an eye on it.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 13:21:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535131#M1967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-15T13:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535540#M1968</link>
      <description>&lt;P&gt;Here is the support ticket:&amp;nbsp;&lt;SPAN&gt;2311150040007106&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 16:52:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535540#M1968</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2023-11-15T16:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535550#M1969</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/425323"&gt;@Joshrodgers123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for the details. We expect you to keep using this forum and also motivate others to do that same.&amp;nbsp;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 16:55:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3535550#M1969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-11-15T16:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3656661#M1971</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/39572"&gt;@Josh&lt;/a&gt;&amp;nbsp;Did you get a reply on how to do use spark-xml with pyspark in Fabric? Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 11:16:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3656661#M1971</guid>
      <dc:creator>ramonsuarez</dc:creator>
      <dc:date>2024-01-24T11:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3656667#M1972</link>
      <description>&lt;P&gt;Can you provide a link to the .jar file or to the webpage where we can download it please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 11:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3656667#M1972</guid>
      <dc:creator>ramonsuarez</dc:creator>
      <dc:date>2024-01-24T11:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3657295#M1973</link>
      <description>&lt;P&gt;It doesn't seem to be supported with pyspark. I got it working by loading the data with scala and then doing my transformations with pyspark.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 14:02:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3657295#M1973</guid>
      <dc:creator>Joshrodgers123</dc:creator>
      <dc:date>2024-01-24T14:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3690296#M1974</link>
      <description>&lt;P&gt;My workaround is loading into a Pandas dataframe and then converting it to a pyspark dataframe before writing to delta tables.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 08:28:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3690296#M1974</guid>
      <dc:creator>ramonsuarez</dc:creator>
      <dc:date>2024-02-09T08:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Spark XML does not work with pyspark</title>
      <link>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3738735#M1975</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One way that i found is:&lt;/P&gt;&lt;P&gt;1 - Create an enviroment&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fgarcia1986_1-1709519835771.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1053200i98BF9F41442BEB37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fgarcia1986_1-1709519835771.png" alt="Fgarcia1986_1-1709519835771.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2 -&amp;nbsp;upload the the file&amp;nbsp;spark-xml_2.12-0.17.0.jar&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fgarcia1986_2-1709519883898.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1053201i0DB732582EAF0111/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fgarcia1986_2-1709519883898.png" alt="Fgarcia1986_2-1709519883898.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open your notebook and language choose spark(scala) and then place the code below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%%configure -f&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;"conf"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;SPAN&gt;"spark.jars.packages"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"com.databricks:spark-xml_2.12:0.16.0"&lt;/SPAN&gt;&lt;SPAN&gt;}}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fgarcia1986_0-1709519689575.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1053199i1765DFEE948F5AF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Fgarcia1986_0-1709519689575.png" alt="Fgarcia1986_0-1709519689575.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IMPORTANT: Must be the first code in the session and you can use the environment WorkSpace Default, you don´t have to use the environment that you´ve created, i don´t know but worked.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Then you can change your language to PySpark(Python) and read xml&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It takes from 2 to 3 minutes to execute.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Let me know if you have any doubt.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope works for everyone&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Mar 2024 02:38:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Data-Engineering/Spark-XML-does-not-work-with-pyspark/m-p/3738735#M1975</guid>
      <dc:creator>Fgarcia1986</dc:creator>
      <dc:date>2024-03-04T02:38:54Z</dc:date>
    </item>
  </channel>
</rss>

