如何忽略配置单元xpath中的dtd?

gwbalxhn  于 2021-05-29  发布在  Hadoop
关注(0)|答案(0)|浏览(437)

如何确保hive忽略dtd?
以下在hive中工作:

select xpath_string('<a><b>bb</b><c>cc</c></a>', 'a/b') from src limit 1;

但此查询没有(添加了dtd):

select xpath_string('<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd"><a><b>bb</b><c>cc</c></a>', 'a/b') from src limit 1;

出现以下错误时失败:

Error occurred executing hive query: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ''a/b'': org.apache.hadoop.hive.ql.metadata.HiveException: Unable to execute method public org.apache.hadoop.io.Text org.apache.hadoop.hive.ql.udf.xml.UDFXPathString.evaluate(java.lang.String,java.lang.String) on object org.apache.hadoop.hive.ql.udf.xml.UDFXPathString@70b25313 of class org.apache.hadoop.hive.ql.udf.xml.UDFXPathString with arguments {<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd"><a><b>bb</b><c>cc</c></a>:java.lang.String, a/b:java.lang.String} of size 2

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题