Can you get the log files and start Hive with more detailled logs?
In could be that not all libraries are loaded (i don’t remember anymore but I 
think this one needs more , I can look next week in my docs) or that it does 
not support maps (not sure). 
You can try first with a more simpler extraction with a String field to see if 
it works .

Hive has always had external libraries for xml support and I used the one below 
with Hive 1.x, but it should also work with 2.x (3 not sure, but it should if 
it works in 2.x)


> On 8. Jun 2018, at 17:53, Mich Talebzadeh <mich.talebza...@gmail.com> wrote:
> 
> I tried Hive 2.0.1, 2.3.2 and now Hive 3/
> 
> I explicitly added hivexmlserde  jar file as ADD JAR shown below
> 
> 0: jdbc:hive2://rhes75:10099/default> ADD JAR 
> hdfs://rhes75:9000/jars/hivexmlserde-1.0.5.3.jar;
> No rows affected (0.002 seconds)
> 
> But still cannot create an xml table
> 
> 0: jdbc:hive2://rhes75:10099/default> CREATE  TABLE xml_41 (imap 
> map<string,string>) ROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe' 
> WITH SERDEPROPERTIES 
> ("column.xpath.imap"="/file-format/data-set/element","xml.map.specification.element"="@name->#content")
>   STORED AS INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat' 
> OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat' 
> TBLPROPERTIES 
> ("xmlinput.start"="<file-format>","xmlinput.end"="</file-format>");
> 
> Error: Error while processing statement: FAILED: Execution Error, return code 
> 1 from org.apache.hadoop.hive.ql.exec.DDLTask. 
> org/apache/hadoop/hive/serde2/SerDe (state=08S01,code=1)
> 
> Does anyone know the cause of this or which version of Hive supports creating 
> an XML table?
> 
> Thanks
> Dr Mich Talebzadeh
>  
> LinkedIn  
> https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
>  
> http://talebzadehmich.wordpress.com
> 
> Disclaimer: Use it at your own risk. Any and all responsibility for any loss, 
> damage or destruction of data or any other property which may arise from 
> relying on this email's technical content is explicitly disclaimed. The 
> author will in no case be liable for any monetary damages arising from such 
> loss, damage or destruction.
>  

Reply via email to