Wednesday, November 12, 2014

How to process XML data files using Hive of Big Data

Copy your xml data file into your local folder

Now create hive table

Hive> create table xmltable(mystr string);

Load data into hive table from local xml file

Hive>load data local inpath ‘xmlfile’ into table xmltable;

Use XPath to convert the array data into normal hive table data

hive> SELECT xpath(xpathexpression)  FROM xmltable;

No comments:

Post a Comment