question

85934427 avatar image
0 Votes"
85934427 asked KranthiPakala-MSFT answered

Process XML files with Synapse Analytics

Does Synapse Analytics support xml format?
If I have my xml files in Azure data lake store, can I use Synapse Spark pool to query the xml files and store the results in Synapse Analytics? Is there any document available for processing XML files with Synapse Analytics.
Also, do I still need Azure Analysis service in the Model & Serve layer if I go with Synapse Analytics.

Thank you!

azure-synapse-analytics
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

KranthiPakala-MSFT avatar image
0 Votes"
KranthiPakala-MSFT answered

Hi @85934427,

Welcome to Microsoft Q&A forum and thanks for your query.

Databricks has a spark driver for XML - GitHub - databricks/spark-xml: XML data source for Spark SQL and DataFrames . You can use this databricks library on Synapse Spark.

Compatible with Spark 3.0 and later with Scala 2.12, and also Spark 3.2 and later with Scala 2.12 or 2.13. Scala 2.11 and Spark 2 support ended with version 0.13.0.

Or you can always read the XML through Python, Scala, C# and write it out to a DataFrame, or implement a UDF to explode it into rows.

Here is a thread where a user shared an example on how they have used it - synapse spark pool - pyspark load a subset of xml files from given folder

Hope this info helps.


  • Please don't forget to click on 130616-image.png and upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how

  • Want a reminder to come back and check responses? Here is how to subscribe to a notification

  • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.