<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question hive table error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127271#M43364</link>
    <description>&lt;P&gt;I  created a hive table as follows :&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE tweetdata(created_at STRING,
text STRING,
  person STRUCT&amp;lt; 
     screen_name:STRING,
     name:STRING,
     locations:STRING,
     description:STRING,
     created_at:STRING,
     followers_count:INT,
     url:STRING&amp;gt;
) ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe' location '/user/flume/tweets';
&lt;/PRE&gt;&lt;P&gt;but I am getting errors doing selecting &lt;/P&gt;&lt;P&gt;iam using HDP2.5 &lt;/P&gt;&lt;PRE&gt;hive&amp;gt;
    &amp;gt; describe tweetdata;
OK
created_at              string                  from deserializer
text                    string                  from deserializer
person                  struct&amp;lt;screen_name:string,name:string,locations:string,description:string,created_at:string,followers_count:int,url:string&amp;gt;   from deserializer
Time taken: 0.076 seconds, Fetched: 3 row(s)
hive&amp;gt; select person.name, text from tweetdata;
OK
Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@4668c5ea; line: 1, column: 2]
Time taken: 0.077 seconds
hive&amp;gt;
&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Oct 2016 03:42:59 GMT</pubDate>
    <dc:creator>aliyesami</dc:creator>
    <dc:date>2016-10-13T03:42:59Z</dc:date>
    <item>
      <title>hive table error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127271#M43364</link>
      <description>&lt;P&gt;I  created a hive table as follows :&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE tweetdata(created_at STRING,
text STRING,
  person STRUCT&amp;lt; 
     screen_name:STRING,
     name:STRING,
     locations:STRING,
     description:STRING,
     created_at:STRING,
     followers_count:INT,
     url:STRING&amp;gt;
) ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe' location '/user/flume/tweets';
&lt;/PRE&gt;&lt;P&gt;but I am getting errors doing selecting &lt;/P&gt;&lt;P&gt;iam using HDP2.5 &lt;/P&gt;&lt;PRE&gt;hive&amp;gt;
    &amp;gt; describe tweetdata;
OK
created_at              string                  from deserializer
text                    string                  from deserializer
person                  struct&amp;lt;screen_name:string,name:string,locations:string,description:string,created_at:string,followers_count:int,url:string&amp;gt;   from deserializer
Time taken: 0.076 seconds, Fetched: 3 row(s)
hive&amp;gt; select person.name, text from tweetdata;
OK
Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@4668c5ea; line: 1, column: 2]
Time taken: 0.077 seconds
hive&amp;gt;
&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2016 03:42:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127271#M43364</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-10-13T03:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: hive table error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127272#M43365</link>
      <description>&lt;P&gt;I just created an empty simple table with no structures and its showing the same behavior .what am I missing here?&lt;/P&gt;&lt;PRE&gt;Logging initialized using configuration in file:/etc/hive/2.5.0.0-1245/0/hive-log4j.properties
hive&amp;gt; create external table load_tweets(id BIGINT,text STRING)
    &amp;gt;      ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
    &amp;gt;      LOCATION '/user/flume/tweets';
OK
Time taken: 1.003 seconds
hive&amp;gt; describe load_tweets;
OK
id                      bigint                  from deserializer
text                    string                  from deserializer
Time taken: 0.268 seconds, Fetched: 2 row(s)
hive&amp;gt;
    &amp;gt; ;
hive&amp;gt; select * from load_tweets;
OK
Failed with exception java.io.IOException:org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.ByteArrayInputStream@5b8402e0; line: 1, column: 2]
Time taken: 1.386 seconds
hive&amp;gt;

&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Oct 2016 03:52:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127272#M43365</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-10-13T03:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: hive table error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127273#M43366</link>
      <description>&lt;P&gt;I fixed this error by using another serde 
"org.openx.data.jsonserde.JsonSerDe " &lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2016 04:59:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hive-table-error/m-p/127273#M43366</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-10-13T04:59:14Z</dc:date>
    </item>
  </channel>
</rss>

