<?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: Aggregation  in nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315972#M226657</link>
    <description>&lt;P&gt;Matt, absolutely right&lt;/P&gt;&lt;P&gt;I tried it and it did work. It was so easy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
    <pubDate>Fri, 07 May 2021 08:35:06 GMT</pubDate>
    <dc:creator>Dmitry</dc:creator>
    <dc:date>2021-05-07T08:35:06Z</dc:date>
    <item>
      <title>Aggregation  in nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315944#M226644</link>
      <description>&lt;P&gt;Hello everebody!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls i need to your advise.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to&amp;nbsp;&lt;SPAN&gt;allows a number of flow-files together into a single flow-file with use general key.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For example, i have two flow-files with next attributes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;manager_name = John Dow&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;costumer_info =&amp;nbsp;Matt Damon&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;costumer_location = LA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;manager_name = John Dow&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;costumer_info =&amp;nbsp;Tony Stark&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;costumer_location = LA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Next, I need to&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;recieve single&amp;nbsp;flow-file with count result of the flow-files with general key = John Dow&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Finally single flow-file whith attributes:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;manager_name = John Dow&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;total = 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How i can do it in nifi?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 12:57:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315944#M226644</guid>
      <dc:creator>Dmitry</dc:creator>
      <dc:date>2021-05-06T12:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation  in nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315956#M226648</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/88350"&gt;@Dmitry&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Trying to fully understand your use case here...&lt;BR /&gt;&lt;BR /&gt;You have 1 to many FlowFile where you want to merge the content of each of those FlowFiles in to a single FlowFile if all those FlowFile have an attribute "&lt;SPAN&gt;&lt;STRONG&gt;manager_name&lt;/STRONG&gt;" with the same value?&lt;BR /&gt;&lt;BR /&gt;If so, the &lt;STRONG&gt;MergeContent&lt;/STRONG&gt;&amp;nbsp;[1] or &lt;STRONG&gt;MergeRecord &lt;/STRONG&gt;[2] processors could do that for you.&amp;nbsp; You would set the "&lt;STRONG&gt;Correlation Attribute Name&lt;/STRONG&gt;" property in those processors the place incoming FlowFiles in to bins based on unique values set for&amp;nbsp;"&lt;STRONG&gt;manager_name&lt;/STRONG&gt;" on each incoming FlowFile.&amp;nbsp; Those bins are then merged based on criteria set in other properties on the processor.&lt;BR /&gt;&lt;BR /&gt;The merged output FlowFile will have several new attribute written to it.&amp;nbsp; One of those new attributes is "&lt;STRONG&gt;merge.count&lt;/STRONG&gt;" which will contain the count of the number fo input FlowFiles that were merged.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You could use an &lt;STRONG&gt;UpdateAttribute&lt;/STRONG&gt; processor to read the value from "&lt;STRONG&gt;merge.count&lt;/STRONG&gt;" and&amp;nbsp;"&lt;STRONG&gt;manager_name&lt;/STRONG&gt;", then assign those to other attribute named "&lt;STRONG&gt;total&lt;/STRONG&gt;" and "&lt;STRONG&gt;general key&lt;/STRONG&gt;" is those attribute names are specifically needed.&lt;BR /&gt;&lt;BR /&gt;[1]&amp;nbsp;&lt;A href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeContent/index.html" target="_blank"&gt;http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeContent/index.html&lt;/A&gt;&lt;BR /&gt;[2]&amp;nbsp;&lt;A href="http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeRecord/index.html" target="_blank"&gt;http://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.MergeRecord/index.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you found this information helped with you question, please take a moment to login and click accept on this solution.&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 20:21:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315956#M226648</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-05-06T20:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregation  in nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315972#M226657</link>
      <description>&lt;P&gt;Matt, absolutely right&lt;/P&gt;&lt;P&gt;I tried it and it did work. It was so easy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Fri, 07 May 2021 08:35:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Aggregation-in-nifi/m-p/315972#M226657</guid>
      <dc:creator>Dmitry</dc:creator>
      <dc:date>2021-05-07T08:35:06Z</dc:date>
    </item>
  </channel>
</rss>

