<?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: putHiveQL error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223011#M184876</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/19449/msumbul.html" nodeid="19449"&gt;@msumbul&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The ConvertJsonToSQL processor has been developed to work with the SQL processors. The Hive processor is expecting a different naming convention on the attributes, instead of:&lt;/P&gt;&lt;PRE&gt;sql.args.N.type/value&lt;/PRE&gt;&lt;P&gt;it is expecting:&lt;/P&gt;&lt;PRE&gt;hiveql.args.N.type/value&lt;/PRE&gt;&lt;P&gt;The syntax between SQL and HQL are close enough and the generated query is also valid for Hive but the attributes need to be renamed. What you can do is to use an UpdateAttribute processor to have the expected attributes before using the PutHiveQL processor.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Oct 2017 21:15:36 GMT</pubDate>
    <dc:creator>pvillard</dc:creator>
    <dc:date>2017-10-17T21:15:36Z</dc:date>
    <item>
      <title>putHiveQL error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223010#M184875</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I try to ingest data in hive with nifi &lt;/P&gt;&lt;P&gt;
(from json data =&amp;gt;convert jsontosql =&amp;gt; puthiveql) &lt;/P&gt;&lt;P&gt;and I got this error message from the puthiveql processor: &lt;/P&gt;&lt;PRE&gt;Caused by: java.lang.RuntimeException: org.apache.hadoop.hive.ql.parse.ParseException:line 1:221 cannot recognize input near '?' ',' '?' in value row constructor &lt;/PRE&gt;&lt;P&gt;if I look at the input flowfile of the puthiveql it has the correct insert query &lt;/P&gt;&lt;PRE&gt;INSERT INTO nifilog (objectid, platform, bulletinid, bulletincategory, bulletingroupid, bulletinlevel, bulletinmessage, bulletinnodeid, bulletinsourceid, bulletinsourcename, bulletinsourcetype, bulletintimestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) &lt;/PRE&gt;&lt;P&gt;each flowfile has all the needed attribute: &lt;/P&gt;&lt;P&gt;sql.args.N.type  &amp;amp; . sql.args.N.value &lt;/P&gt;&lt;P&gt;Any idea how to debug/solve this?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 19:25:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223010#M184875</guid>
      <dc:creator>msumbul1</dc:creator>
      <dc:date>2017-10-17T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: putHiveQL error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223011#M184876</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/19449/msumbul.html" nodeid="19449"&gt;@msumbul&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;The ConvertJsonToSQL processor has been developed to work with the SQL processors. The Hive processor is expecting a different naming convention on the attributes, instead of:&lt;/P&gt;&lt;PRE&gt;sql.args.N.type/value&lt;/PRE&gt;&lt;P&gt;it is expecting:&lt;/P&gt;&lt;PRE&gt;hiveql.args.N.type/value&lt;/PRE&gt;&lt;P&gt;The syntax between SQL and HQL are close enough and the generated query is also valid for Hive but the attributes need to be renamed. What you can do is to use an UpdateAttribute processor to have the expected attributes before using the PutHiveQL processor.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 21:15:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223011#M184876</guid>
      <dc:creator>pvillard</dc:creator>
      <dc:date>2017-10-17T21:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: putHiveQL error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223012#M184877</link>
      <description>&lt;P&gt;As of NiFi 1.5.0 (via &lt;A href="https://issues.apache.org/jira/browse/NIFI-4684" target="_blank"&gt;NIFI-4684&lt;/A&gt;), you can now specify the prefix in ConvertJSONToSQL. The property defaults to "sql" to maintain existing behavior, but can be changed to "hiveql" for use with PutHiveQL.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Apr 2018 20:35:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/putHiveQL-error/m-p/223012#M184877</guid>
      <dc:creator>mburgess</dc:creator>
      <dc:date>2018-04-12T20:35:12Z</dc:date>
    </item>
  </channel>
</rss>

