最近使用mrql做xml文件解析,使用xpath来进行判断
使用的方法如下,其中t.mrql文件如下:
v =args[1];
store ty:=source(xml,args[0],{"page"},xpath(.[@id=\'ID6\']/place));
ty;mrql -local t.mrql hdfs://183.175.12.220:9010/user/hadoop/xmlInput/pt_98866.xml ID6
执行的结构如下所示:
v =args[1];
store ty:=source(xml,args[0],{"page"},xpath(.[@id=\'ID6\']/place));
ty;mrql -local t.mrql hdfs://183.175.12.220:9010/user/hadoop/xmlInput/pt_98866.xml ID6
相关文章: