<?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 Re: Creating a HIVE table with structs inside structs with org.apache.hcatalog.data.JsonSerDe in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212951#M66170</link>
    <description>&lt;P&gt;I guess there are some errors in your DDL. The first one I can see is that location should be:&lt;/P&gt;&lt;PRE&gt;array&amp;lt;struct&amp;lt;x: double, y: double&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;Please try with this change and see whether it works or there are other problems.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2017 16:20:36 GMT</pubDate>
    <dc:creator>mgaido1</dc:creator>
    <dc:date>2017-08-08T16:20:36Z</dc:date>
    <item>
      <title>Creating a HIVE table with structs inside structs with org.apache.hcatalog.data.JsonSerDe</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212950#M66169</link>
      <description>&lt;P&gt;I'm trying to create a hive external table using org.apache.hcatalog.data.JsonSerDe library based on this example &lt;A href="https://community.hortonworks.com/questions/28684/creating-a-hive-table-with-orgapachehcatalogdatajs.html" target="_blank"&gt;https://community.hortonworks.com/questions/28684/creating-a-hive-table-with-orgapachehcatalogdatajs.html&lt;/A&gt;. The thing is that when I try with a very simple json structure it works fine but when I try with a more complex one (such as having a struct inside a struct attribute) I get the org.apache.hive.service.cli.HiveSQLException: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected error when I do a simple query. &lt;/P&gt;&lt;P&gt;Data Example:&lt;/P&gt;&lt;P&gt;{  "user": {    "userlocation": "California, Santa Clara",    "id": 222222,    "name": "Hortonworks",    "screenname": "hortonworks",    "geoenabled": true, "location":[{"x":-88.083131,"y":99.984982},{"x":-88.083131,"y":99.984982}] },  "tweetmessage": "Learn more about #Spark in #HDP 2.3 with @Hortonworks founder @acmurthy in this video overview &lt;A href="http://bit.ly/1gOyr9w" target="_blank"&gt;http://bit.ly/1gOyr9w&lt;/A&gt;  #hadoop",  "createddate": "2015-07-24T16:30:33"}&lt;/P&gt;&lt;P&gt;Query:&lt;/P&gt;&lt;P&gt;CREATE EXTERNAL TABLE tweets (  createddate string,  geolocation string,  tweetmessage string, `user` struct&amp;lt;geoenabled:boolean, id:int, name:string, screenname:string, userlocation:string, location:struct&amp;lt;x: double, y: double&amp;gt;&amp;gt;)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe' LOCATION '/user/root/';&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 00:06:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212950#M66169</guid>
      <dc:creator>mbarrientos</dc:creator>
      <dc:date>2017-08-08T00:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a HIVE table with structs inside structs with org.apache.hcatalog.data.JsonSerDe</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212951#M66170</link>
      <description>&lt;P&gt;I guess there are some errors in your DDL. The first one I can see is that location should be:&lt;/P&gt;&lt;PRE&gt;array&amp;lt;struct&amp;lt;x: double, y: double&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;P&gt;Please try with this change and see whether it works or there are other problems.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 16:20:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212951#M66170</guid>
      <dc:creator>mgaido1</dc:creator>
      <dc:date>2017-08-08T16:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a HIVE table with structs inside structs with org.apache.hcatalog.data.JsonSerDe</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212952#M66171</link>
      <description>&lt;P&gt;Thanks a lot. That worked.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2017 21:19:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Creating-a-HIVE-table-with-structs-inside-structs-with-org/m-p/212952#M66171</guid>
      <dc:creator>mbarrientos</dc:creator>
      <dc:date>2017-08-08T21:19:19Z</dc:date>
    </item>
  </channel>
</rss>

