Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

trying to create hive table to read xml file

avatar
Explorer

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
Explorer

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

avatar

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