<?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: Hive JSON Serde Key Value string:string hcatalog in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194337#M71251</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47309/mignic1991.html" nodeid="47309"&gt;@Miguel Rodriguez&lt;/A&gt; &lt;/P&gt;&lt;P&gt;The JSON you are using isn't valid, you need to remove the double quotes around the map column value.&lt;/P&gt;&lt;P&gt;So your JSON would be:&lt;/P&gt;&lt;PRE&gt;{"a":"a1","b":"b1","d":{"key1":"pair1","key2":"pair2"}} &lt;/PRE&gt;</description>
    <pubDate>Mon, 13 Nov 2017 22:56:10 GMT</pubDate>
    <dc:creator>ccotter</dc:creator>
    <dc:date>2017-11-13T22:56:10Z</dc:date>
    <item>
      <title>Hive JSON Serde Key Value string:string hcatalog</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194336#M71250</link>
      <description>&lt;P&gt;I am trying to query the following Json file:&lt;/P&gt;&lt;PRE&gt;{"a":"a1","b":"b1","d":"{"key1":"pair1","key2":"pair2"}"} &lt;/PRE&gt;&lt;P&gt;I have created the following table to query it:&lt;/P&gt;&lt;PRE&gt;    CREATE EXTERNAL TABLE database.testingjson(
    	a STRING,
    	b STRING,
    	c STRING,
    	d map&amp;lt;string,string&amp;gt;
    )
    ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
    STORED AS TEXTFILE
    LOCATION 'location';
&lt;/PRE&gt;&lt;P&gt;Shows the following exception: &lt;/P&gt;&lt;PRE&gt;    SQL Error: java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
      java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
        java.io.IOException: org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
          org.apache.hadoop.hive.serde2.SerDeException: java.io.IOException: Start of Object expected
            java.io.IOException: Start of Object expected
              java.io.IOException: Start of Object expected&lt;/PRE&gt;&lt;P&gt;If I delete the map from the table there is no problem and queries the data correctly. Is there anything that I'm missing? Or the hcatalog doesn't accept key value fields? &lt;/P&gt;&lt;P&gt;I'm using Hive 1.2&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 20:41:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194336#M71250</guid>
      <dc:creator>mignic1991</dc:creator>
      <dc:date>2017-11-13T20:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hive JSON Serde Key Value string:string hcatalog</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194337#M71251</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47309/mignic1991.html" nodeid="47309"&gt;@Miguel Rodriguez&lt;/A&gt; &lt;/P&gt;&lt;P&gt;The JSON you are using isn't valid, you need to remove the double quotes around the map column value.&lt;/P&gt;&lt;P&gt;So your JSON would be:&lt;/P&gt;&lt;PRE&gt;{"a":"a1","b":"b1","d":{"key1":"pair1","key2":"pair2"}} &lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Nov 2017 22:56:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194337#M71251</guid>
      <dc:creator>ccotter</dc:creator>
      <dc:date>2017-11-13T22:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hive JSON Serde Key Value string:string hcatalog</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194338#M71252</link>
      <description>&lt;P&gt;Oh god, thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 23:24:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-JSON-Serde-Key-Value-string-string-hcatalog/m-p/194338#M71252</guid>
      <dc:creator>mignic1991</dc:creator>
      <dc:date>2017-11-13T23:24:06Z</dc:date>
    </item>
  </channel>
</rss>

