How to load XML data file into Hive table? -


while loading xml data file hive table got following error message:

failed: semanticexception 7:9 input format must implement inputformat. error   encountered near token 'storesxml'.   

the way loading xml file follows :

**create table storesxml

   'create external table storesxml (storexml string)    stored inputformat 'org.apache.mahout.classifier.bayes.xmlinputformat'    outputformat 'org.apache.hadoop.hive.ql.io.hiveignorekeytextoutputformat'    location '/user/hive/warehouse/stores';' 

** location /user/hive/warehouse/stores in hdfs.

load data inpath <local path xml file stored> table storesxml;

now,problem when select column table storesxml ,the above mentioned error comes up.

please me it.where going wrong?

1) first need create single column table

create table xmlsample(xml string); 

2) after need load data in local/hdfs hive table like

load data inpath '---------' table xmlsample; 

3) next using xpath, xpath_array,xpath_string sample xml queries..


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -