Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

trying to create hive table to read xml file

avatar
New Member

CREATE EXTERNAL TABLE BOOKDATA (TITLE STRING, PRICE FLOAT) ROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe' WITH SERDEPROPERTIES ( "column.xpath.TITLE"="/BOOK/TITLE/text()", "column.xpath.PRICE"="/BOOK/PRICE/text()") STORED AS INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat' OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat' LOCATION '/home/airflow/swagat/sample.xml' TBLPROPERTIES ("xmlinput.start"="<BOOK","xmlinput.end"= "</BOOK>");

getting below error

FAILED: SemanticException Cannot find class 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'

1 ACCEPTED SOLUTION

avatar
@swagat challagondla

Have you added custom jar for class "'com.ibm.spss.hive.serde2.xml.XmlInputFormat" before creating the table?

View solution in original post

3 REPLIES 3

avatar
@swagat challagondla

Have you added custom jar for class "'com.ibm.spss.hive.serde2.xml.XmlInputFormat" before creating the table?

avatar
New Member

Hi SIndhu i added them now i am able to create thanks for the help

avatar
Frequent Visitor

From where I can get the jar for com.ibm.spss.hive.serde2.xml.XmlInputFormat ?