'Error in AWS Athena while querying table created via crawled XML in AWS Glue

I have parsed an XML file through the crawler in AWS Glue which created a table. I'm trying to get the DDL script for the same in AWS Athena and getting the following error:

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.NullPointerException. This query ran against the "xyz" database, unless qualified by the query.

Similarly for a select statement I get the following error:

HIVE_UNSUPPORTED_FORMAT: Unable to create input format

I followed the steps in this document and try adding the TableType attribute in the table properties inside management console to resolve the DDL part but it didn't help. https://aws.amazon.com/premiumsupport/knowledge-center/athena-failed-nullpointerexception-error/

Any suggestion or help to resolve the issue is appreciated. Let me know if any other information is required.

Note : I'm not supposed to convert the XML file to any other format.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source