0

I'm creating a simple hive table using this XML Serde, but it's throwing an exception when trying to parse the XPath below.

I've tried to use the VTD and Javax processor for the following xpath: column.xpath.is_application=/Msg/Header/Type='APP' but it throws the following exception:

VTD:

java.lang.RuntimeException: com.ximpleware.XPathEvalException: BinaryExpr can't eval to a node set!

Javax.xml:

Caused by: javax.xml.xpath.XPathExpressionException: com.sun.org.apache.xpath.internal.XPathException: Can not convert #BOOLEAN to a NodeList!

Example XML Doc

<Msg>
  <Header>
     <Type>APP</Type>
  </Header>
</Msg>

What am I doing wrong?

darkCode
  • 140
  • 8
  • Could it be that you want `/Msg/Header[Type='APP']`? – Tomalak May 18 '18 at 13:25
  • @Tomalak no but to be clear I've added an example XML doc – darkCode May 18 '18 at 13:35
  • The error clearly says *"BinaryExpr can't eval to a node set"* so it expects a node set and not `true()` or `false()`. – Tomalak May 18 '18 at 14:29
  • yes I agree, but I was hoping someone who has used this serde can tell me how they would go about getting the value of true/false (which may mean changing the xpath or maybe a property on the Hive CREATE TABLE statement) or that it's not supported and other potential workarounds. I couldn't see any references to it in the documentation. – darkCode May 18 '18 at 15:51

0 Answers0