<?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 incremantal fetch from mongo db NIFI in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365793#M239394</link>
    <description>&lt;P&gt;i have&amp;nbsp; NIFI mongo db connection and need to fetch only new record , i have a long column (transactiondate) (yyyy-MM-dd HH:mm:ss) and need the new transactions in last 1 sec .&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Mar 2023 20:06:35 GMT</pubDate>
    <dc:creator>moahmedhassaan</dc:creator>
    <dc:date>2023-03-09T20:06:35Z</dc:date>
    <item>
      <title>incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365793#M239394</link>
      <description>&lt;P&gt;i have&amp;nbsp; NIFI mongo db connection and need to fetch only new record , i have a long column (transactiondate) (yyyy-MM-dd HH:mm:ss) and need the new transactions in last 1 sec .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 20:06:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365793#M239394</guid>
      <dc:creator>moahmedhassaan</dc:creator>
      <dc:date>2023-03-09T20:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365816#M239402</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/101675"&gt;@moahmedhassaan&lt;/a&gt;, it would really help if would provide more details about your flow, even how you query your data. Having and testing a MongoDB is not easy for everybody because there are not lots of people who have it available.&lt;BR /&gt;Nevertheless, there might a solution, not very efficient but it might do your thing:&lt;BR /&gt;Add a GenerateFlowFile Processor, where you configure a property like : ${now():format("yyyy-MM-dd HH:mm")}:${now():format("ss"):minus(1)}. Set this processor to run only on the primary node so you won't have to many generated files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cotopaul_0-1678430557368.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36945i76CF307F5F1FD46A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cotopaul_0-1678430557368.png" alt="cotopaul_0-1678430557368.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Send the success queue to your GetMongo Processor.&lt;/P&gt;&lt;P&gt;Within the GetMongo Processor, in the query property you write your query with the condition on transactiondate &amp;gt; The_property_defined_in_Generate_Flow_File.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cotopaul_1-1678430661056.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36946iAE550A599FDD6CFD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cotopaul_1-1678430661056.png" alt="cotopaul_1-1678430661056.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Again this is not a very bright solution, but it could suite your needs until somebody with more experience can provide you with a solution &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 06:45:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365816#M239402</guid>
      <dc:creator>cotopaul</dc:creator>
      <dc:date>2023-03-10T06:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365830#M239413</link>
      <description>&lt;P&gt;thanks for your reply but query in getmongo processor not select statment it's json .&amp;nbsp;&lt;/P&gt;&lt;P&gt;i try query using {"TransactionHistory":"&lt;SPAN&gt;2022-12-21T13:24:34.945+00:00&lt;/SPAN&gt;"} as the original&amp;nbsp; date format but with no result .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 09:39:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365830#M239413</guid>
      <dc:creator>moahmedhassaan</dc:creator>
      <dc:date>2023-03-10T09:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365844#M239421</link>
      <description>&lt;P&gt;maybe you can try with something like? I have no access to any MongoDBs right now, to test it myself &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;{&lt;SPAN class="hljs-string"&gt;"TransactionHistory"&lt;/SPAN&gt;: {&lt;SPAN class="hljs-string"&gt;"&lt;SPAN class="hljs-variable"&gt;$gt&lt;/SPAN&gt;"&lt;/SPAN&gt;: &lt;SPAN class="hljs-string"&gt;"&amp;lt;your_value_here&amp;gt;"&lt;/SPAN&gt;}}&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 11:04:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365844#M239421</guid>
      <dc:creator>cotopaul</dc:creator>
      <dc:date>2023-03-10T11:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365850#M239422</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/103151" target="_blank"&gt;&lt;SPAN class=""&gt;cotopaul&lt;/SPAN&gt;&lt;/A&gt;&amp;nbsp;for your comment , it seems fine for not date column like&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{&lt;SPAN class="hljs-string"&gt;"_id"&lt;/SPAN&gt;: {&lt;SPAN class="hljs-string"&gt;"&lt;SPAN class="hljs-variable"&gt;$gt&lt;/SPAN&gt;"&lt;/SPAN&gt;: 10}}&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;but for matching the timestamp not working&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 12:06:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365850#M239422</guid>
      <dc:creator>moahmedhassaan</dc:creator>
      <dc:date>2023-03-10T12:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365852#M239424</link>
      <description>&lt;P&gt;this form work in mongo&amp;nbsp;{"transactionDate": {"$gt": ISODate("2021-12-21")}}&amp;nbsp; &amp;nbsp;but not in nifi&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 12:15:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365852#M239424</guid>
      <dc:creator>moahmedhassaan</dc:creator>
      <dc:date>2023-03-10T12:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365861#M239426</link>
      <description>&lt;P&gt;Why does it not work in NiFi? What sort of an error message do you receive? NiFi basically executes what you set in the query property. If you can execute it in mongo, it should work from NiFi as well.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 13:08:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365861#M239426</guid>
      <dc:creator>cotopaul</dc:creator>
      <dc:date>2023-03-10T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365928#M239443</link>
      <description>&lt;P&gt;it give an error due to (&lt;SPAN&gt;ISODate&lt;/SPAN&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 12 Mar 2023 13:18:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365928#M239443</guid>
      <dc:creator>moahmedhassaan</dc:creator>
      <dc:date>2023-03-12T13:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: incremantal fetch from mongo db NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365971#M239455</link>
      <description>&lt;P&gt;can you maybe post the statement you are running in mongo + the result and afterwards the query you execute in NiFi and the entire error message you receive? Right now it seems to be an error regarding the format of the date/query. I am not that familiar with mongoDB but maybe in the meantime somebody with more experience will intervene.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 09:38:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/incremantal-fetch-from-mongo-db-NIFI/m-p/365971#M239455</guid>
      <dc:creator>cotopaul</dc:creator>
      <dc:date>2023-03-13T09:38:02Z</dc:date>
    </item>
  </channel>
</rss>

