<?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: Getting parse exception while using get_json_object in Hive in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123875#M34426</link>
    <description>&lt;P&gt;It ran, I replaced quotes with a single apostrophe and it worked. Thanks a lot.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jul 2016 03:56:14 GMT</pubDate>
    <dc:creator>mrizvi</dc:creator>
    <dc:date>2016-07-12T03:56:14Z</dc:date>
    <item>
      <title>Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123868#M34419</link>
      <description>&lt;P&gt;Using HDP2.5 TP Sandbox, I created a Hive table using HBaseStorageHandler. Created an another table json_staging and load the json file. Now I want to insert that json file into the first table using simple get_json_object UDF. Getting the following exception. Has anyone experienced this error before, please help&lt;/P&gt;&lt;PRE&gt;java.lang.Exception: org.apache.hive.service.cli.HiveSQLException: Error while compiling statement: FAILED: ParseException line 5:2 Failed to recognize predicate 'get_json_object'. Failed rule: 'regularBody' in statement
&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:27:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123868#M34419</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-07-12T01:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123869#M34420</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt; could you please attach your code?  Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:32:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123869#M34420</guid>
      <dc:creator>SQLShaw</dc:creator>
      <dc:date>2016-07-12T01:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123870#M34421</link>
      <description>&lt;P&gt;I am doing insert like this:&lt;/P&gt;&lt;P&gt;INSERT OVERWRITE TABLE hbase_table_json SELECT
  get_json_object(json_staging.json, "$.key") AS key,
  get_json_object(json_staging.json, "$.driverId") AS driverId,
  get_json_object(json_staging.json, "$.driverName") AS driverName
  get_json_object(json_staging.json, "$.eventTime") AS eventTime,
  get_json_object(json_staging.json, "$.eventType") AS eventType,
  get_json_object(json_staging.json, "$.latitudeColumn") AS latitudeColumn,
  get_json_object(json_staging.json, "$.longitudeColumn") AS longitudeColumn,
  get_json_object(json_staging.json, "$.routeId") AS routeId,
  get_json_object(json_staging.json, "$.routeName") AS routeName,
  get_json_object(json_staging.json, "$.truckId") AS truckId
FROM json_staging;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:33:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123870#M34421</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-07-12T01:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123871#M34422</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/10331/mrizvi.html"&gt;mrizvi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You are missing a comma after driverName right before get_json_object(json_staging.json, "$.eventTime")&lt;/P&gt;&lt;P&gt;if this resolves this problem, please accept this response.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:52:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123871#M34422</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-07-12T01:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123872#M34423</link>
      <description>&lt;P&gt;json_staging table has the following data:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;{"key": 1, "driverId": "123", "driverName":"James", "eventTime":"2015-08-21 12:23:45.231", "eventType":"Normal", "latitudeColumn":"38.440467", "longitudeColumn":"-122.714431", "routeId":"345", "routeName":"San Francisco to San Diego", "truckId":"67"}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{"key": 2, "driverId": "352", "driverName":"John", "eventTime":"2015-09-24 10:45:56.289", "eventType":"Abnormal", "latitudeColumn":"33.19587", "longitudeColumn":"-117.379483", "routeId":"315", "routeName":"San Jose to Los Angeles", "truckId":"23"}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{"key": 3, "driverId": "657", "driverName":"Tim", "eventTime":"2016-05-02 05:45:11.009", "eventType":"Normal", "latitudeColumn":"34.44805", "longitudeColumn":"-119.242889", "routeId":"169", "routeName":"San Mateo to Fremont", "truckId":"29"}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:54:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123872#M34423</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-07-12T01:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123873#M34424</link>
      <description>&lt;P&gt;Thanks for pointing that out, but still getting the same exception&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 01:57:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123873#M34424</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-07-12T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123874#M34425</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;@mrizvi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10331/mrizvi.html" nodeid="10331"&gt;&lt;/A&gt;Your SQL statement uses a reserved word, &lt;STRONG&gt;key&lt;/STRONG&gt;. In general, it is a good practice to use back ticks, e.g. `key`  to avoid special keywords or special characters issues, ... These special apostrophes (back ticks) that you can find on upper left of your keyboard. Could you rewrite your query to use at least `key` instead of just key? There may be a similar problem with the use of "$.key"... &lt;/P&gt;&lt;P&gt;Additionally, I would use '$.Foo' instead of "$.Foo", use single apostrophes instead quotes ... Just as a good practice.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 02:31:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123874#M34425</guid>
      <dc:creator>cstanca</dc:creator>
      <dc:date>2016-07-12T02:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Getting parse exception while using get_json_object in Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123875#M34426</link>
      <description>&lt;P&gt;It ran, I replaced quotes with a single apostrophe and it worked. Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 03:56:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Getting-parse-exception-while-using-get-json-object-in-Hive/m-p/123875#M34426</guid>
      <dc:creator>mrizvi</dc:creator>
      <dc:date>2016-07-12T03:56:14Z</dc:date>
    </item>
  </channel>
</rss>

