<?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: Merge files based on attribute and send email notification in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/353788#M236799</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/93831"&gt;@Jagapriyan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your described flow above does not mention the mergeContent processor which is what would be needed to merge multiple FlowFiles with matching attributes values into 1 output FlowFile.&lt;BR /&gt;&lt;BR /&gt;Share your MergeContent processor configuration.&lt;BR /&gt;&lt;BR /&gt;Additionally the ListSFTP processor does not download the content of the files form the remote server.&amp;nbsp; It is only used to list the files on the remote server and set attributes on the FlowFile that would be used by the FetchSFTP processor to actually download the content.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do you know when you have all the files for a given state?&amp;nbsp; Is this a continues feed of files?&amp;nbsp; Is this a daily job?&amp;nbsp; While file count is different per state, is count same per state?&amp;nbsp; What is the highest count and lowest count?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Matt&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 21:44:10 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2022-09-30T21:44:10Z</dc:date>
    <item>
      <title>NiFi: Merge files based on attribute and send email notification</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/353517#M236737</link>
      <description>&lt;P&gt;I have a requirement to notify once the files on the destination is processed.&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The pipeline is as follows: ListSFTP --&amp;gt; Update attribute (adds specific attribute for each state/province) ---&amp;gt; Send to Cloud Storage.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Each state has a different count of files.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Once the files are sent to cloud storage, notify the end user using email for each state.&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I have tried merging files based on a common attribute but, I need single files for each state so that I can send one notification for each state.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 12:02:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/353517#M236737</guid>
      <dc:creator>Jagapriyan</dc:creator>
      <dc:date>2022-09-28T12:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: Merge files based on attribute and send email notification</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/353788#M236799</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/93831"&gt;@Jagapriyan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your described flow above does not mention the mergeContent processor which is what would be needed to merge multiple FlowFiles with matching attributes values into 1 output FlowFile.&lt;BR /&gt;&lt;BR /&gt;Share your MergeContent processor configuration.&lt;BR /&gt;&lt;BR /&gt;Additionally the ListSFTP processor does not download the content of the files form the remote server.&amp;nbsp; It is only used to list the files on the remote server and set attributes on the FlowFile that would be used by the FetchSFTP processor to actually download the content.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;How do you know when you have all the files for a given state?&amp;nbsp; Is this a continues feed of files?&amp;nbsp; Is this a daily job?&amp;nbsp; While file count is different per state, is count same per state?&amp;nbsp; What is the highest count and lowest count?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Matt&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 21:44:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/353788#M236799</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2022-09-30T21:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: Merge files based on attribute and send email notification</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/354761#M236976</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the time to respond.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;How do you know when you have all the files for a given state?&lt;/EM&gt;&amp;nbsp;&lt;/STRONG&gt; Usually, the files are status reports for the previous report. They are generated between 8am to 9am everyday.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example: If I have 2 countries US and Canada, there will be 90 files for US and 100 files for Canada. (the number of files may vary based on usage the date before)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The flow:&amp;nbsp;&lt;/STRONG&gt;We have a list SFTP processor and Fetch SFTP processor that are collecting these files and storing on GCP.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The requirement:&amp;nbsp;&lt;/STRONG&gt; I need to send an email notifying that files are delivered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I Tried:&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;Since I need to send one email for each country, I tried&amp;nbsp; "replacetext" processor to remove the contents of the flow file and then merge the files into one. Since I can't use a hardcoded number, I couldn't give a value in minimum entries.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current Merge content processor&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jagapriyan_0-1665664863474.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/35901i7C36BF550278074A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jagapriyan_0-1665664863474.png" alt="Jagapriyan_0-1665664863474.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 12:41:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/354761#M236976</guid>
      <dc:creator>Jagapriyan</dc:creator>
      <dc:date>2022-10-13T12:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: Merge files based on attribute and send email notification</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/355861#M237152</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/93831"&gt;@Jagapriyan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As a daily job, i may suggest you tackle this differently.&lt;BR /&gt;You know your source files are written between 8am - 9am each day.&amp;nbsp;&lt;BR /&gt;So i would configure your listSFTP to run on a cron schedule so it runs every second from 9am-10am to make sure all files are listed.&amp;nbsp; Then knowing that your files may number 90+ (unknown on max) , I would configure your "Min Num of Entries" to some value you know the count will never reach.&amp;nbsp; Make sure "Max Num Entries" is set to a value higher than that.&amp;nbsp; Then configure the "Max Bin Age" to some time 30 mins?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What this does is allow MergeContent to continue to allocated FlowFiles to a bin for 30 minutes at which time the bin is forced to merge even if the min value has not be reached.&amp;nbsp; Doing this makes sure you get only one FlowFile out per bin per node.&amp;nbsp; That single FlowFile can then be used to trigger your putEmail used for notification.&amp;nbsp; Additionally, the merged FlowFile will have an attribute "&lt;SPAN&gt;merge.count" added that you can use in your email body to report number of FlowFiles that were ingested.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 19:41:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/355861#M237152</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2022-10-21T19:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi: Merge files based on attribute and send email notification</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/356361#M237264</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/103"&gt;@Matt&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 07:05:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-Merge-files-based-on-attribute-and-send-email/m-p/356361#M237264</guid>
      <dc:creator>Jagapriyan</dc:creator>
      <dc:date>2022-10-28T07:05:21Z</dc:date>
    </item>
  </channel>
</rss>

