Home Forums Hive / HCatalog analyse xml file in hadoop

This topic contains 1 reply, has 2 voices, and was last updated by  Carter Shanklin 1 year ago.

  • Creator
    Topic
  • #28745

    Anupam Gupta
    Participant

    HI, i have uploaded XML file in hdfs , Now I want to know how can analyse/see the xml file in hadoop? I am new to hadoop please help.

    Thanlks,
    Agupta

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #28939

    Carter Shanklin
    Participant

    Agupta,

    Hive provides a number of XPath UDFs you can use.

    See https://cwiki.apache.org/confluence/display/Hive/LanguageManual+XPathUDF

    What is usually done is that the XML files are loaded into a Hive table using string columns, one per row. So you might have a DDL like CREATE TABLE xmlfiles (id int, xmlfile string);

    Then you can use any of the UDFs against the XML data.

    Collapse
Viewing 1 replies (of 1 total)