<?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: NiFi Will QueryDatabaseTable reset the Maximum-value Columns everytime I restart the processor in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233604#M75297</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/66220/rsoni.html" nodeid="66220"&gt;@Rahul Soni&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for the great explanation. just a quick question, is there a way I can modify that value. Just in case if I need to restart the flow from some specific point&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 13:32:46 GMT</pubDate>
    <dc:creator>gaurang_n_shah</dc:creator>
    <dc:date>2018-03-07T13:32:46Z</dc:date>
    <item>
      <title>NiFi Will QueryDatabaseTable reset the Maximum-value Columns everytime I restart the processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233602#M75295</link>
      <description>&lt;P&gt;hi Guys,&lt;/P&gt;&lt;P&gt;According to the document mentioned below, it seems like if I will restart the processor it will reset the value of maximum column value I have provided and will start fetching data from the beginning.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Document Link:&lt;/STRONG&gt; &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache.nifi.processors.standard.QueryDatabaseTable/index.html"&gt; https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.apache.nifi.processors.standard.QueryDatabaseTable/index.html&lt;/A&gt; &lt;/P&gt;&lt;PRE&gt;A comma-separated list of column names. The processor will keep track of the maximum value for each column that has been returned since the processor started running.&lt;/PRE&gt;&lt;UL&gt;
&lt;LI&gt;However, I tested this behavior, and even if I restart the processor I get incremental load only. is there a mistake in the document or have missed something?&lt;/LI&gt;&lt;LI&gt;What would happen if I re-deploy the job, I mean deleting the job and re-creating it from the template?&lt;/LI&gt;&lt;LI&gt;In the code, it has mentioned that the value will be stored as part of Scop.CLUSTER.  would someone please explain to me what is it? and in which conditions the state will be cleared? &lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;@Stateful(scopes = Scope.CLUSTER, description = "After performing a query on the specified table, the maximum values for "        + "the specified column(s) will be retained for use in future executions of the query. This allows the Processor "        + "to fetch only those records that have max values greater than the retained values. This can be used for "        + "incremental fetching, fetching of newly added rows, etc. To clear the maximum values, clear the state of the processor "        + "per the State Management documentation")&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Mar 2018 09:23:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233602#M75295</guid>
      <dc:creator>gaurang_n_shah</dc:creator>
      <dc:date>2018-03-05T09:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Will QueryDatabaseTable reset the Maximum-value Columns everytime I restart the processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233603#M75296</link>
      <description>&lt;DIV&gt;Short answers to your bullets!&lt;/DIV&gt;&lt;UL&gt;
&lt;LI&gt;However, I tested this behavior, and even if I restart the processor I get incremental load only. is there a mistake in the document or have missed something?&lt;UL&gt;&lt;LI&gt;No mistake in the document. The processor is considered started the first time you started it. Stopping a processor and then restarting it is not going to clear it's "state"&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;What would happen if I re-deploy the job, I mean deleting the job and re-creating it from the template?&lt;UL&gt;&lt;LI&gt;Everything will happen from scratch!&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;In the code, it has mentioned that the value will be stored as part of Scop.CLUSTER. would someone please explain to me what is it? and in which conditions the state will be cleared?&lt;UL&gt;&lt;LI&gt;NiFi provides two basic operating modes: standalone and clustered. When operating in a cluster, Processors often need some mechanism of coordinating state between nodes. So NiFi stores the state centrally in Zookeeper for "clustered" mode. Thus "clustered" scope for the state.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Now  QueryDatabaseTable processor behavior in detail.&lt;/P&gt;&lt;P&gt;QueryDatabaseTable is a "stateful" processor. That is, it will store certain information regarding the processor's "processing", get it! Processor's processing!! No? Never mind!&lt;/P&gt;&lt;P&gt;So whenever this processor queries the database, it stores the information regarding the "Maximum value" of the columns you mentioned while configuring. So right click your processor and check the state!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="64482-screen-shot-2018-03-04-at-111425-pm.png" style="width: 808px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14720iF934B47568EFC1E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="64482-screen-shot-2018-03-04-at-111425-pm.png" alt="64482-screen-shot-2018-03-04-at-111425-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Clicking on this option will present you a window as shown below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="64483-screen-shot-2018-03-04-at-111440-pm.png" style="width: 1512px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14721i053C260B3FA9BD94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="64483-screen-shot-2018-03-04-at-111440-pm.png" alt="64483-screen-shot-2018-03-04-at-111440-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You will be able to see whatever value "&lt;STRONG&gt;&lt;EM&gt;persisted&lt;/EM&gt;&lt;/STRONG&gt;" at that point of time by your processor. When you start-stop-start [restart in your terms] the processor, it simply won't make any difference to the state.&lt;/P&gt;&lt;P&gt;There you see a "Clear State" option. Clicking on that option can Clear the state for you. That is what is calling the clear() method of StateManager and "reset" your processor to square one!&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:11:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233603#M75296</guid>
      <dc:creator>RahulSoni</dc:creator>
      <dc:date>2019-08-18T00:11:59Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Will QueryDatabaseTable reset the Maximum-value Columns everytime I restart the processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233604#M75297</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/66220/rsoni.html" nodeid="66220"&gt;@Rahul Soni&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks for the great explanation. just a quick question, is there a way I can modify that value. Just in case if I need to restart the flow from some specific point&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 13:32:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233604#M75297</guid>
      <dc:creator>gaurang_n_shah</dc:creator>
      <dc:date>2018-03-07T13:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi Will QueryDatabaseTable reset the Maximum-value Columns everytime I restart the processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233605#M75298</link>
      <description>&lt;P&gt;You may want to look at &lt;A href="https://community.hortonworks.com/questions/110112/nifi-set-databases-processor-state-in-zookeeper.html"&gt;this answer.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 22:30:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/NiFi-Will-QueryDatabaseTable-reset-the-Maximum-value-Columns/m-p/233605#M75298</guid>
      <dc:creator>RahulSoni</dc:creator>
      <dc:date>2018-03-07T22:30:22Z</dc:date>
    </item>
  </channel>
</rss>

