<?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 is there a way to set Hive Parameters in Apache Nifi ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189559#M151652</link>
    <description>&lt;P&gt;Hi All , is there a way to set hive parameters in Apache Nifi . I would want to set some Hive related parameters before ingestion . Is it possible using Apache Nifi ? If yes , could I set these values in say the Update Attribute processor and then direct it to a PutHiveQL or PutHiveStreaming ?? &lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Fri, 11 May 2018 03:14:24 GMT</pubDate>
    <dc:creator>abhinav_joshi</dc:creator>
    <dc:date>2018-05-11T03:14:24Z</dc:date>
    <item>
      <title>is there a way to set Hive Parameters in Apache Nifi ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189559#M151652</link>
      <description>&lt;P&gt;Hi All , is there a way to set hive parameters in Apache Nifi . I would want to set some Hive related parameters before ingestion . Is it possible using Apache Nifi ? If yes , could I set these values in say the Update Attribute processor and then direct it to a PutHiveQL or PutHiveStreaming ?? &lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 03:14:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189559#M151652</guid>
      <dc:creator>abhinav_joshi</dc:creator>
      <dc:date>2018-05-11T03:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to set Hive Parameters in Apache Nifi ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189560#M151653</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/70516/abhinavjoshi.html" nodeid="70516"&gt;@Abhinav Joshi&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;Controller service doesn't change parameters based on the flowfile attributes, once the controller service is enabled with some parameter then we are going to have that parameter set to each job that we are executing by using same controller.&lt;/P&gt;&lt;P&gt;You can use Jdbc connection string in Hive controller service to add all the parameters that needs to be added by using &lt;STRONG&gt;;(semicolon) &lt;/STRONG&gt;as a delimiter.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;jdbc:hive2://&amp;lt;connection string&amp;gt;?tez.queue.name=&amp;lt;queue-name&amp;gt;;hive.support.quoted.identifiers=none&lt;/PRE&gt;&lt;P&gt;in the above connection string i have added two parameters to the connection pool service.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(or)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Connection pool Connection string will be declared without all the parameters. &lt;/P&gt;&lt;PRE&gt;jdbc:hive2://&amp;lt;connection string&amp;gt;&lt;/PRE&gt;&lt;P&gt;Keep your attributes to the flowfile before PutHiveQl processor use Replace text processor and replace all your parameters with the statement(ddl/dml..) that you are executing using PutHiveQL processor.&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;While executing the job you can set all the parameters like&lt;/P&gt;&lt;PRE&gt;set tez.queue.name=&amp;lt;queue-name&amp;gt;;&amp;lt;br&amp;gt;set hive.support.quoted.identifiers=none;&amp;lt;br&amp;gt;insert into final table select * from staging table&lt;/PRE&gt;&lt;P&gt;in &lt;STRONG&gt;puthiveql&lt;/STRONG&gt; processor we are having &lt;STRONG&gt;Statement Delimiter &lt;/STRONG&gt;property value  as ; which going to execute all the statements at once and for the session that has been initialized we are going to have all these parameters has been set.&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;PutHiveStreaming&lt;/STRONG&gt; processor supports expression language for Database name,table name.. etc properties so we can change the parameters based on the flowfile attributes.NOTE: If multiple concurrent tasks are configured for this processor, only one table can be written to at any time by a single thread. Additional tasks intending to write to the same table will wait for the current task to finish writing to the table.&lt;/P&gt;&lt;P&gt;For more information please take a look into this &lt;A href="https://issues.apache.org/jira/browse/NIFI-3426?src=confmacro" target="_blank"&gt;jira&lt;/A&gt; addressing about dynamic properties for Connection pool.&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 06:08:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189560#M151653</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-05-11T06:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to set Hive Parameters in Apache Nifi ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189561#M151654</link>
      <description>&lt;P&gt;Thanks for these details. I will try all this and see if I can get this fixed . The basic issue we are facing here is when we are trying to insert data into a partitioned hive table using "put hive streaming"  processor . The issue that we are getting is as follows :- &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;org.apache.nifi.util.hive.HiveWriter$CommitFailure:
Commit of Txn 36315 failed on EndPoint:
{metaStoreUri='thrift://caplifs0c.telecom.tcnz.net:9083', database='adhoc',
table='nifi_s_order_test1', partitionVals=[2015-10-26] }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Do you by any chance have an idea how to fix this issue . The "PutHiveStreaming" works fine for a non partitioned table but as soon as we have this set to a partitioned table , we start seeing these issues. Actually , we set all the required hive parameters in the update attribute processor just before the put hive streaming processor. Screen shot below :-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="73434-nocod.png" style="width: 632px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18556iDEAAEFE2D0E007DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="73434-nocod.png" alt="73434-nocod.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Have you used the put hive streaming processor to insert data into a partitioned table ?&lt;/P&gt;&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929" target="_blank"&gt;@Shu&lt;/A&gt; . waiting for your response&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://community.cloudera.com/t5/image/serverpage/image-id/6691iD5D0C748E66845A5/image-size/large?v=1.0&amp;amp;px=999" border="0" alt="pphhs.png" title="pphhs.png" /&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:42:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189561#M151654</guid>
      <dc:creator>abhinav_joshi</dc:creator>
      <dc:date>2019-08-18T07:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: is there a way to set Hive Parameters in Apache Nifi ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189562#M151655</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks - this is now fixed. We realized the Nifi Nodes werent added to the hadoop topology which is why we were getting that error. This has been added and the data is going through !! &lt;/P&gt;&lt;P&gt;Thanks for all the help .. Have accepted your answer .. &lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 08:18:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/is-there-a-way-to-set-Hive-Parameters-in-Apache-Nifi/m-p/189562#M151655</guid>
      <dc:creator>abhinav_joshi</dc:creator>
      <dc:date>2018-05-11T08:18:37Z</dc:date>
    </item>
  </channel>
</rss>

