<?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 process group scheduling via control m in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323688#M229196</link>
    <description>&lt;P&gt;In general, Nifi is not very well suited for event-based processing (E.G. an external scheduling tool pinging nifi to start a process group run). I do not know how Control M works, but what you're describing sounds like it could be achieved with Nifi's REST API (you can directly start/stop a specific process group by its ID).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The requirement for checking if everything got inserted to your database is also quite hard to accomplish accurately. You could use the REST API once more to check your process group has no queued files (which would mean all your flowfiles successfully passed through the flow), though you'll also have to think about what should happen if writing to the DB fails. I don't believe there is any great way to check if your scheduled run 'completed', but you could definitely use some other processor to 'notify' yourself if something failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this answer helped, please mark it as 'solved' and/or apply 'kudos' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 04 Sep 2021 22:15:28 GMT</pubDate>
    <dc:creator>Green_</dc:creator>
    <dc:date>2021-09-04T22:15:28Z</dc:date>
    <item>
      <title>Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323683#M229193</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am new to Nifi.My requirement is to trigger Nifi process group using external scheduling tool called Control M. I tried using shell script to start and.stop the process group using curl command. Process group will fetch data from text file and writes into a database but unable to determine when the process group gets completed because I could see status like Started, Running and Stopped but not Completed state. Struck with this issue and need your valuable inputs on this of how to determine all the records got inserted into database placed inside process group.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 12:31:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323683#M229193</guid>
      <dc:creator>Chakkara</dc:creator>
      <dc:date>2021-09-04T12:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323688#M229196</link>
      <description>&lt;P&gt;In general, Nifi is not very well suited for event-based processing (E.G. an external scheduling tool pinging nifi to start a process group run). I do not know how Control M works, but what you're describing sounds like it could be achieved with Nifi's REST API (you can directly start/stop a specific process group by its ID).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The requirement for checking if everything got inserted to your database is also quite hard to accomplish accurately. You could use the REST API once more to check your process group has no queued files (which would mean all your flowfiles successfully passed through the flow), though you'll also have to think about what should happen if writing to the DB fails. I don't believe there is any great way to check if your scheduled run 'completed', but you could definitely use some other processor to 'notify' yourself if something failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If this answer helped, please mark it as 'solved' and/or apply 'kudos' &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Sep 2021 22:15:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323688#M229196</guid>
      <dc:creator>Green_</dc:creator>
      <dc:date>2021-09-04T22:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323691#M229199</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are orchestrating NiFi flow status(completion/Failed) through Control-M. This is the step below to be followed .&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Control-M put the files in source folder (SFTP server) and will be waiting for status through Status API (which you have to build separate REST API flow using Request processor to expose the status message).&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. NiFi List SFTP will be keep listening the file(.txt) and once new file has placed by Control-M , NiFi will process the file and NiFi processor load the content into Database , Database processor will have Success and Failure relationship . Success flow files you can capture status as success and 1 value using Update attribute processor , this values should be stored into distributed cache/other storage area using relevant processor .Same process for failure (-1) flow as well .&lt;/P&gt;&lt;P&gt;3. Now status message stored into distributed cache/other storage area, You can query the status from distributed cache/other storage area using Fetch processor and pass to Response processor to the waiting Control-M job (Control-M should keep polling the status until it receive response 1 and -1.&lt;/P&gt;&lt;P&gt;4. When Control-M finds 1 value then the flow is success and if -1 then processing has failed .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 05 Sep 2021 12:39:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323691#M229199</guid>
      <dc:creator>adhishankarit</dc:creator>
      <dc:date>2021-09-05T12:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323792#M229207</link>
      <description>&lt;P&gt;It's a bit hard to imagine your flow just from the description, but I think I understood it. What other questions do you have about it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my opinion it doesn't sound too great adding an attribute to every flowfile after it is written to the DB, only to then write it to a cache which control m will query (if I understood correctly).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your only requirement is to know whether all the files were successfully written to your DB, you should simply ignore files which were successfully inserted and only apply some logic when an insert fails. Perhaps if a file fails you can write it to someplace else so you will be able to investigate why it failed (some place more persistent than a cache). If you just want to be alerted when an insert fails / want to return a response to control m, just add an invokehttp processor after the failure relationship from your putDB processor (if I correctly understood that control m expects http calls).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because nifi is stream oriented, it's hard to tell&amp;nbsp; exactly when a batch of files has finished writing to your DB unless you know exactly how many records should be written (and then counting the flowfiles passed to success is actually reasonable).&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 15:56:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/323792#M229207</guid>
      <dc:creator>Green_</dc:creator>
      <dc:date>2021-09-06T15:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/346866#M235008</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/57238"&gt;@adhishankarit&lt;/a&gt;&amp;nbsp;@Could you please help to share some sample flow to handle using distributed cache for success and failure scenarios.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 17:32:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/346866#M235008</guid>
      <dc:creator>Chakkara</dc:creator>
      <dc:date>2022-07-05T17:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/346877#M235011</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88760"&gt;@Chakkara&lt;/a&gt;&amp;nbsp;As this is an older post, you would have a better chance of receiving a resolution by&lt;A href="“https://community.cloudera.com/t5/forums/postpage/board-id/Questions”" target="_blank"&gt; starting a new thread&lt;/A&gt;. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jul 2022 18:14:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/346877#M235011</guid>
      <dc:creator>DianaTorres</dc:creator>
      <dc:date>2022-07-05T18:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi process group scheduling via control m</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/347431#M235164</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88760"&gt;@Chakkara&lt;/a&gt;&amp;nbsp; As far as i remember , distributed cache is not having consistency . You could use Hbase or HDFS for storing the status of success or failure of the processors for downstream application. Once you saved the Success and Failure at Hbase . You can retrieve it from the Hbase processor using the row ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Build a REST API&amp;nbsp; NiFi flow to pull the status from Hbase&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HandleHTTPRequest --&amp;gt; FetchHbaseRow - HandleHTTPResponse&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can call the HTTP API (Request and Response) via shell script/curl and call the script from Control-M.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2022 22:08:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Nifi-process-group-scheduling-via-control-m/m-p/347431#M235164</guid>
      <dc:creator>adhishankarit</dc:creator>
      <dc:date>2022-07-12T22:08:57Z</dc:date>
    </item>
  </channel>
</rss>

