Forum Discussion
Spark XML does not work with pyspark
- 2 years ago
One way that i found is:
1 - Create an enviroment
2 - upload the the file spark-xml_2.12-0.17.0.jar
Open your notebook and language choose spark(scala) and then place the code below:
%%configure -f{"conf": {"spark.jars.packages": "com.databricks:spark-xml_2.12:0.16.0"}}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.Then you can change your language to PySpark(Python) and read xmlIt takes from 2 to 3 minutes to execute.Let me know if you have any doubt.I hope works for everyoneCheers
Hi Joshrodgers123
Apologies for the delay in response.
I would request you to please go ahead with Microsoft support for this. Please raise a support ticket on this link: https://support.fabric.microsoft.com/en-US/support/.
Also once you have opened the support ticket , please do share the supportcase# here so that we can keep an eye on it.
Thanks
Here is the support ticket: 2311150040007106
- Joshrodgers1232 years agoAdvocate V
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.
- ramonsuarez2 years agoAdvocate II
My workaround is loading into a Pandas dataframe and then converting it to a pyspark dataframe before writing to delta tables.
- Anonymous2 years agoNot applicable
Hi Joshrodgers123
Thanks for the details. We expect you to keep using this forum and also motivate others to do that same.
Thanks - ramonsuarez2 years agoAdvocate II
Josh Did you get a reply on how to do use spark-xml with pyspark in Fabric? Thanks