<?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: Merge data based on the record count and field values using NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359092#M238016</link>
    <description>&lt;P&gt;Hi Team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone help&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2022 06:19:37 GMT</pubDate>
    <dc:creator>Techie123</dc:creator>
    <dc:date>2022-12-08T06:19:37Z</dc:date>
    <item>
      <title>Merge data based on the record count and field values using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359013#M237999</link>
      <description>&lt;P&gt;I am fetching data from table for employees and each employees has maximum 7 Records. I am splitting data based on the IDs and week number column. I need to merge the data in such a way that each flow file contains 100 records and all the records of each employees comes into that flow file&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;My flow file already has 98 records and next employee has 7 records so, that employee's data should not be the part of that flow file. It should come in next flow file likewise.....&amp;nbsp; While merging the FFs order is also important.&lt;/P&gt;&lt;P&gt;How can I do that. I am not familiar with all the processors of NiFi&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 06:20:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359013#M237999</guid>
      <dc:creator>Techie123</dc:creator>
      <dc:date>2022-12-07T06:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Merge data based on the record count and field values using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359092#M238016</link>
      <description>&lt;P&gt;Hi Team,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can anyone help&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 06:19:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359092#M238016</guid>
      <dc:creator>Techie123</dc:creator>
      <dc:date>2022-12-08T06:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: Merge data based on the record count and field values using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359289#M238064</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/98568"&gt;@Techie123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you provide more detail around your requirement for "t&lt;SPAN&gt;he FFs order is also important".&lt;BR /&gt;&lt;BR /&gt;My initial thought here would be a two phase merge.&amp;nbsp; In the first Merge you utilize a correlation FlowFile attribute you create on each FlowFile based off the employees ID extracted from the record.&amp;nbsp; Setting min number of entries to 7 and max to 10.&amp;nbsp; Then you take these employee merged records and merge them together in to larger FlowFiles using MergeRecord.&amp;nbsp; The question is if 100 records per FlowFile is a hard limit or not which it does not.&lt;BR /&gt;&lt;BR /&gt;The MergeRecord processor Max number of records is soft limit.&amp;nbsp; Let's assume we set this to 100. So lets say one of your merged employee records comes to the MergeRecord and has 7 records in it for that employee ID, yet the bin already has 98 records in it.&amp;nbsp; Since bin min has not been met yet, this merged FlowFile still gets added and results in merged FlowFile with 105 records.&amp;nbsp; If you must keep it under 100 records per FlowFile set the max records to 94.&amp;nbsp; If at end of adding a set of merged employee records it is less than 94 another merge employee record would&amp;nbsp;be added and since you stated each set of merged employee records could be up to 7, this keeps you below or at 100 in that single merged record.&lt;BR /&gt;&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, 09 Dec 2022 21:09:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359289#M238064</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2022-12-09T21:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Merge data based on the record count and field values using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359312#M238075</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;, I did lot of investigation on the same but was not sure merge record can do that. Thanks a lot for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 14:51:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Merge-data-based-on-the-record-count-and-field-values-using/m-p/359312#M238075</guid>
      <dc:creator>Techie123</dc:creator>
      <dc:date>2022-12-10T14:51:29Z</dc:date>
    </item>
  </channel>
</rss>

