While trying to execute the create table statement in hive getting the below error.
CREATE EXTERNAL TABLE BOOKDATA(
> TITLE VARCHAR(40),
> PRICE INT
> )ROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe'
> WITH SERDEPROPERTIES (
> "column.xpath.TITLE"="/CATALOG/BOOK/TITLE/",
> "column.xpath.PRICE"="/CATALOG/BOOK/PRICE/")
> STORED AS
> INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'
> OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'
> LOCATION '/sourcedata'
> TBLPROPERTIES (
> "xmlinput.start"="<CATALOG",
> "xmlinput.end"= "</CATALOG>"
> );
失败:semanticexception找不到类“com.ibm.spss.hive.serde2.xml.xmlinputformat”
请帮助解决此问题。我正在使用配置单元cli。
2条答案
按热度按时间jc3wubiy1#
我过去也面临过类似的问题。对我来说,结果就是把Hive引擎换成了tez。
设置hive.execution.engine=tez;
当您设置tez引擎时,它将获取运行查询所需的所有jar。
如果你觉得合适就告诉我。
hmtdttj42#
https://cwiki.apache.org/confluence/display/hive/configuration+properties#configurationproperties-查询执行
1
需要重新启动hiveserver2
Hive辅助罐路径
-默认值:(空)
-添加到:hive 0.2.0或更早版本
包含用户定义函数(UDF)和SERDE实现的插件jar的位置。
2
hive.reloadable.aux.jars.path
-默认值:(空)
-添加到:hive 0.14.0和hive-7553
插件jar的位置,可以是逗号分隔的文件夹或jar。它们可以通过执行beeline reload命令进行更新(添加、删除或更新),而无需重新启动hiveserver2。这些jar可以像hive.aux.jars.path中的辅助类一样用于创建udf或serde。