Process XML files with Synapse Analytics

Poornima Sreedhar 21 Reputation points
2021-11-01T11:55:37.753+00:00

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
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,346 questions
0 comments No comments
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,422 Reputation points Microsoft Employee
    2021-11-03T17:02:42.26+00:00

    Hi @Poornima Sreedhar ,

    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
    0 comments No comments

0 additional answers

Sort by: Most helpful