How to query nested XML file in AWS Athena via Glue

后端 未结 2 1275
既然无缘
既然无缘 2021-01-16 10:19

I want the nested XML file to query from AWS Athena using AWS glue.





99988881111

        
相关标签:
2条回答
  • 2021-01-16 10:45

    Currently, Amazon Athena does not support the XML file format. You may find the list of supported formats here: Supported SerDes and Data Formats - Amazon Athena

    Since AWS Glue supports XML as an ETL input format (https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-format.html), you may first convert your data from XML to JSON and then query the JSON data using Athena.

    0 讨论(0)
  • 2021-01-16 10:51

    Athena cannot process XML file(s) directly. So, we need to any of the format's (CSV/JSON/etc..) which Athena supports.

    1) Crawl XML file in Glue (Give proper rowTag value)
    2) Write a Glue job to convert XML to CSV/JSON
    3) Crawl converted CSV/JSON

    0 讨论(0)
提交回复
热议问题