We can load XML data in HIVE Table very easily just like simple delimited file.
The only difference between loading Delimited File and XML File is we have to use Hive provided xpath UDF in order to extract the data residing within the tags.

All the steps that I have used are committed in following file on GitHub GIST.
You can find below screenshots depicting the execution scenarios of those commands.

Loading XML into Hive
Process Screenshot
VIEW records
Incremental Records via VIEW

Thank you for having a read.
Kindly revert back if you have any doubts or need more clarifications.

Advertisements

One thought on “Load XML File in Hive

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s