{"action":"created","issue":{"url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/3","labels_url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/3/comments","events_url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/3/events","html_url":"https://github.com/dvasilen/Hive-XML-SerDe/issues/3","id":32761387,"number":3,"title":"Hive 0.13 - SELECT * returns the field contents, but CREATE TABLE X as SELECT * from ext_table returns null;","user":{"login":"cs905s","id":191779,"avatar_url":"https://avatars.githubusercontent.com/u/191779?v=3","gravatar_id":"","url":"https://api.github.com/users/cs905s","html_url":"https://github.com/cs905s","followers_url":"https://api.github.com/users/cs905s/followers","following_url":"https://api.github.com/users/cs905s/following{/other_user}","gists_url":"https://api.github.com/users/cs905s/gists{/gist_id}","starred_url":"https://api.github.com/users/cs905s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cs905s/subscriptions","organizations_url":"https://api.github.com/users/cs905s/orgs","repos_url":"https://api.github.com/users/cs905s/repos","events_url":"https://api.github.com/users/cs905s/events{/privacy}","received_events_url":"https://api.github.com/users/cs905s/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"dvasilen","id":3604906,"avatar_url":"https://avatars.githubusercontent.com/u/3604906?v=3","gravatar_id":"","url":"https://api.github.com/users/dvasilen","html_url":"https://github.com/dvasilen","followers_url":"https://api.github.com/users/dvasilen/followers","following_url":"https://api.github.com/users/dvasilen/following{/other_user}","gists_url":"https://api.github.com/users/dvasilen/gists{/gist_id}","starred_url":"https://api.github.com/users/dvasilen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dvasilen/subscriptions","organizations_url":"https://api.github.com/users/dvasilen/orgs","repos_url":"https://api.github.com/users/dvasilen/repos","events_url":"https://api.github.com/users/dvasilen/events{/privacy}","received_events_url":"https://api.github.com/users/dvasilen/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2014-05-04T04:37:52Z","updated_at":"2015-05-17T08:33:03Z","closed_at":"2014-06-05T17:34:54Z","body":"On HDP 2.1 platform,\r\nSELECT * from ext_table\r\n    returns the field contents reliably but\r\nSELECT a from ext_tables ruin.\r\n\r\nExample:\r\n```sql\r\ndrop table dmm_raw;\r\ncreate external table dmm_raw(\r\n   a STRING,b STRING)\r\nROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe'\r\nwith SERDEPROPERTIES (\r\n \"column.xpath.a\"=\"/DmmEvent/EventType/text()\",\r\n \"column.xpath.b\"=\"/DmmEvent/@DateTime\"\r\n)\r\nSTORED AS\r\n INPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'\r\n OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.IgnoreKeyTextOutputFormat'\r\n LOCATION '/user/hue//DmmEventLog'\r\nTBLPROPERTIES (\r\n \"xmlinput.start\"=\"<DmmEvent Date\",\r\n \"xmlinput.end\"=\"</DmmEvent>\"\r\n\r\n ); \r\n```\r\nSample XML\r\n```xml\r\n<?xml version=\"1.0\" ?>\r\n<DmmEventLog>\r\n<DmmEvent DateTime=\"2012-02-01 17:12:30.721735538-0800\">\r\n    <EventType>PRE_SHUTDOWN</EventType>\r\n</DmmEvent>\r\n</DmmEventLog>\r\n```"},"comment":{"url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/comments/102768031","html_url":"https://github.com/dvasilen/Hive-XML-SerDe/issues/3#issuecomment-102768031","issue_url":"https://api.github.com/repos/dvasilen/Hive-XML-SerDe/issues/3","id":102768031,"user":{"login":"bnrinbox","id":12479484,"avatar_url":"https://avatars.githubusercontent.com/u/12479484?v=3","gravatar_id":"","url":"https://api.github.com/users/bnrinbox","html_url":"https://github.com/bnrinbox","followers_url":"https://api.github.com/users/bnrinbox/followers","following_url":"https://api.github.com/users/bnrinbox/following{/other_user}","gists_url":"https://api.github.com/users/bnrinbox/gists{/gist_id}","starred_url":"https://api.github.com/users/bnrinbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnrinbox/subscriptions","organizations_url":"https://api.github.com/users/bnrinbox/orgs","repos_url":"https://api.github.com/users/bnrinbox/repos","events_url":"https://api.github.com/users/bnrinbox/events{/privacy}","received_events_url":"https://api.github.com/users/bnrinbox/received_events","type":"User","site_admin":false},"created_at":"2015-05-17T08:33:03Z","updated_at":"2015-05-17T08:33:03Z","body":"Hi dvasilen, \r\ni am using cloudera 5.1 and still getting the same error. means, retuning null values for each column.  Here is the history of statements. \r\n\r\nAdded jar file :  /./././hivexmlserde-1.0.5.0.jar ; \r\ninput data: in xml file (in single line format given)\r\n<transactions><transaction><trans_id>11111</trans_id><trans_dt>sunilnarain</trans_dt></transaction><transaction><trans_id>22222</trans_id><trans_dt>narayankarthikeyan</trans_dt></transaction><transaction><trans_id>33333</trans_id><trans_dt>anilambani</trans_dt></transaction><transaction><trans_id>44444</trans_id><trans_dt>yoganandbaaliga</trans_dt></transaction><transaction><trans_id>55555</trans_id><trans_dt>luckydhruti</trans_dt></transaction></transactions>\r\n\r\n---starting  --  creation of table --\r\nCREATE TABLE serde_test6(TRXN_ID INT,TRXN_DT STRING)\r\nROW FORMAT SERDE 'com.ibm.spss.hive.serde2.xml.XmlSerDe'\r\nWITH SERDEPROPERTIES(\r\n\"column.xpath.TRXN_ID\"=\"/transaction/trans_id/text()\",\r\n\"column.xpath.TRXN_DT\"=\"/transaction/trans_dt/text()\"\r\n)\r\nSTORED AS\r\nINPUTFORMAT 'com.ibm.spss.hive.serde2.xml.XmlInputFormat'\r\nOUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'\r\nTBLPROPERTIES(\r\n\"xmlinput.start\"=\"<transactions>\",\r\n\"xmlinput.end\"=\"</transactions>\"\r\n) ;\r\n\r\nhive> LOAD DATA LOCAL INPATH '/./././serde' INTO TABLE serde_test6;\r\nOK \r\nTime taken: 0.32 secoonds\r\n\r\nhive> select * from serde_test6 ; \r\nOK\r\nNULL\tNULL\r\nNULL\tNULL\r\nTime taken: 0.422 seconds, Fetched: 2 row(s)\r\n\r\n\r\nhive> select trxn_id, trxn_dt from serde_test6 ; \r\nTotal MapReduce jobs = 1\r\nLaunching Job 1 out of 1\r\nNumber of reduce tasks is set to 0 since there's no reduce operator\r\nStarting Job = job_1431886869823_0002, Tracking URL = N/A\r\nKill Command = /usr/lib/hadoop/bin/hadoop job  -kill job_1431886869823_0002\r\nHadoop job information for Stage-1: number of mappers: 1; number of reducers: 0\r\n2015-05-18 02:28:37,764 Stage-1 map = 0%,  reduce = 0%\r\n2015-05-18 02:29:20,687 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 2.54 sec\r\n2015-05-18 02:29:21,865 Stage-1 map = 100%,  reduce = 0%, Cumulative CPU 2.54 sec\r\nMapReduce Total cumulative CPU time: 2 seconds 540 msec\r\nEnded Job = job_1431886869823_0002\r\nMapReduce Jobs Launched: \r\nJob 0: Map: 1   Cumulative CPU: 2.54 sec   HDFS Read: 1208 HDFS Write: 12 SUCCESS\r\nTotal MapReduce CPU Time Spent: 2 seconds 540 msec\r\nOK\r\nNULL\tNULL\r\nNULL\tNULL\r\nTime taken: 103.673 seconds, Fetched: 2 row(s)\r\nhive> \r\n\r\n-----end ------------\r\n\r\ni also used hivexmlserde-1.0.5.2.jar in place of hivexmlserde-1.0.5.0.jar. though the result is same.  not getting hint also. can you please guide something more on this issue.\r\n"}}