<?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 JSON Hive import mapping not working correctly in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182959#M70934</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;This is my first post here. I have an issue trying to map a JSON field starting with a hash (#) to a Hive column using the (simplified) statement below :&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE foobar_table (
    foobar STRING
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
WITH SERDEPROPERTIES ( 'mapping.foobar' = '#foobar' ) 
LOCATION '/data/foobar';
 &lt;/PRE&gt;&lt;P&gt;Using the following JSON file below:&lt;/P&gt;&lt;PRE&gt;{"#foobar":"some_value"}
&lt;/PRE&gt;&lt;P&gt;There are no issues when the special character is removed, but this is no solution in the real-world scenario.&lt;/P&gt;&lt;P&gt;Is the fact the mapping isn't working a bug in the code, or am I using the wrong (version of) JsonSerDe. I'm using HDP-2.5.0.0&lt;/P&gt;&lt;P&gt;Hopefully someone can supply with an answer other then renaming the JSON field.&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 00:02:33 GMT</pubDate>
    <dc:creator>arjan_onwezen</dc:creator>
    <dc:date>2017-11-08T00:02:33Z</dc:date>
    <item>
      <title>JSON Hive import mapping not working correctly</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182959#M70934</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;This is my first post here. I have an issue trying to map a JSON field starting with a hash (#) to a Hive column using the (simplified) statement below :&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE foobar_table (
    foobar STRING
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
WITH SERDEPROPERTIES ( 'mapping.foobar' = '#foobar' ) 
LOCATION '/data/foobar';
 &lt;/PRE&gt;&lt;P&gt;Using the following JSON file below:&lt;/P&gt;&lt;PRE&gt;{"#foobar":"some_value"}
&lt;/PRE&gt;&lt;P&gt;There are no issues when the special character is removed, but this is no solution in the real-world scenario.&lt;/P&gt;&lt;P&gt;Is the fact the mapping isn't working a bug in the code, or am I using the wrong (version of) JsonSerDe. I'm using HDP-2.5.0.0&lt;/P&gt;&lt;P&gt;Hopefully someone can supply with an answer other then renaming the JSON field.&lt;/P&gt;&lt;P&gt;Thanks in advance..&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 00:02:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182959#M70934</guid>
      <dc:creator>arjan_onwezen</dc:creator>
      <dc:date>2017-11-08T00:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Hive import mapping not working correctly</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182960#M70935</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/47237/arjanonwezen.html" nodeid="47237"&gt;@Arjan Onwezen&lt;/A&gt; the hcatalog jsonSerde doesn't look like it uses the SERDEPROPERTIES mappings and only maps exact fieldnames to column names  or JSON field names matching Hive internal column names, i.e _col0, _col1. I think the JsonSerde you are referring to is the &lt;A href="https://github.com/rcongiu/Hive-JSON-Serde"&gt;rcongui Hive-JSON-Serde&lt;/A&gt; which should work as you've outlined. &lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 19:47:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182960#M70935</guid>
      <dc:creator>ccotter</dc:creator>
      <dc:date>2017-11-08T19:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSON Hive import mapping not working correctly</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182961#M70936</link>
      <description>&lt;P&gt;@Chris Cotter Thank you for our answer. I can confirm the &lt;A href="https://github.com/rcongiu/Hive-JSON-Serde"&gt;RconGUI's version&lt;/A&gt; of JSON Serde works to circumvent the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 21:54:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/JSON-Hive-import-mapping-not-working-correctly/m-p/182961#M70936</guid>
      <dc:creator>arjan_onwezen</dc:creator>
      <dc:date>2017-11-08T21:54:57Z</dc:date>
    </item>
  </channel>
</rss>

