如何在容器中基于xmls定义hdinsight配置单元外部表

mrwjdhj3  于 2021-06-28  发布在  Hive
关注(0)|答案(1)|浏览(300)

我尝试创建配置单元外部表:
创建外部表testxml(storexml string),存储为textfile位置'wasb:///test/';
但是,当我尝试执行下面这样的查询时,它无法提取字段:select xpath\u string(storexml,“/trades/trade/usi”)

FROM TestXML;

我看到一个帖子,里面说要指定输入格式。add jars<>设置xmlinput.element=store;创建外部表eventstorexml(storexml字符串),存储为inputformat'msdn.hadoop.mapreduce.input.xmlementStreamingInputFormat'outputformat'org.apache.hadoop.hive.ql.io.hiveignorekeytextoutputformat'location'wasb:///eventstore@tradedata.blob.core.windows.net/';
我无法确定要在add jars语句中包含哪些jar。我在linux上使用hdinsight。
任何提示都将不胜感激-马杜

tcomlyy6

tcomlyy61#

意识到问题在于xml有回车符,因此无法读取xml。

相关问题