<?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: How to Merge files together by file attribute in Nifi.? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172218#M134511</link>
    <description>&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;As part of requirement need to merge multiple flows using merge content processor , which 
needs to merged using two attributes , as suggested above I have used 
update Attribute before merge content processor and created a new 
attribute and then using this in correlation attribute in merge content. But I am getting multiple files as output,  expecting one file per group .What configuration is needed to handle this ?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Nov 2018 14:59:39 GMT</pubDate>
    <dc:creator>sunny1423</dc:creator>
    <dc:date>2018-11-30T14:59:39Z</dc:date>
    <item>
      <title>How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172209#M134502</link>
      <description>&lt;P&gt;Hi ,I have 1000 files in a folder  , file names have date(yyyymmdd) in it. for ex data_20160810.csv...i have 200 files per each day (so 5 days files). I want merge those files by date . so if successful, i my output folder will contain 5 merged files one for each day.&lt;/P&gt;&lt;P&gt;i am trying to do this by "Correlation Attribute Name" property..but still it is not merging in groups. &lt;/P&gt;&lt;P&gt;what am i doing wrong.?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6527-mergebydate.png" style="width: 1013px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20015iCD0896EA074C55C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6527-mergebydate.png" alt="6527-mergebydate.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:34:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172209#M134502</guid>
      <dc:creator>saikrishna_tara</dc:creator>
      <dc:date>2019-08-18T10:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172210#M134503</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11732/saikrishnatarapareddy.html" nodeid="11732"&gt;@Saikrishna Tarapareddy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The attribute to correlate on needs to be present in the flowfile for the Merge processor to use it. If you are using FetchFile to get the file, you can add an attribute into that processor using the filename or the substring of the file name. Then it will be present in the flowfile for subsequent processors to use.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 04:32:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172210#M134503</guid>
      <dc:creator>emaxwell</dc:creator>
      <dc:date>2016-08-11T04:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172211#M134504</link>
      <description>&lt;P&gt;This answer is correct, just wanted to add additional clarification...&lt;/P&gt;&lt;P&gt;The "Correlation Attribute Name" is not the actual value to correlate on, its the &lt;STRONG&gt;name of an attribute&lt;/STRONG&gt; that has the value to correlate on. So as suggested, you could use an UpdateAttribute processor to create an attribute like:&lt;/P&gt;&lt;P&gt;correlation.id = ${filename:substring(5,13)}&lt;/P&gt;&lt;P&gt;Then in MergeContent put correlation.id as the value of Correlation Attribute Name.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 20:21:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172211#M134504</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2016-08-11T20:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172212#M134505</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363" target="_blank"&gt;@Bryan Bende&lt;/A&gt; , &lt;A rel="user" href="https://community.cloudera.com/users/98/emaxwell.html" nodeid="98" target="_blank"&gt;@emaxwell&lt;/A&gt;&lt;/P&gt;&lt;P&gt;something seems to be not correct..I am doing the same thing . but it is still mergeing all in to one file. here are some screen shots for your reference.&lt;/P&gt;&lt;P&gt;I was testing this with 4 files in source folder 2 per each date. expecting the mergecontent to output 2 files. but its merging all in 1 file. here is my update attribute process after Fetch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6584-corid.png" style="width: 690px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20011iF34D6B182C9B43BA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6584-corid.png" alt="6584-corid.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and when I use data provenance I could correctly see the value like below..2 different correlation.Ids on 4 files as expected.(2 ids for 20121021 and 2 for 20121020)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6586-corat.png" style="width: 579px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20012i21759881CE9A1C41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6586-corat.png" alt="6586-corat.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and here is how mergeprocess looks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6587-mergecorat.png" style="width: 773px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20013iD278CD7B6D90F43D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6587-mergecorat.png" alt="6587-mergecorat.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;data provenance on the Mergeprocess JOIN type..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6585-corat2.png" style="width: 933px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20014iC2FA0DBB3972D8E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6585-corat2.png" alt="6585-corat2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:34:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172212#M134505</guid>
      <dc:creator>saikrishna_tara</dc:creator>
      <dc:date>2019-08-18T10:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172213#M134506</link>
      <description>&lt;P&gt;looks like by just doing correlation.id instead of {correlation.id} in the MergeProcess is doing the trick .&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2016 23:29:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172213#M134506</guid>
      <dc:creator>saikrishna_tara</dc:creator>
      <dc:date>2016-08-11T23:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172214#M134507</link>
      <description>&lt;P&gt;Yes thats what i was trying to say about it being the name of an attribute, and not the attribute itself.&lt;/P&gt;&lt;P&gt;When you put ${correlation.id} the framework evaluates that first, in your case it ends up being something like 20121021, and then MergeContent goes to look for an attribute called "20121021" which doesn't exist.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2016 00:45:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172214#M134507</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2016-08-12T00:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172215#M134508</link>
      <description>&lt;P style="margin-left: 20px;"&gt;&lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363"&gt;@Bryan Bende&lt;/A&gt; ,&lt;/P&gt;&lt;P style="margin-left: 20px;"&gt;How do I send files with same header (hardcoded??) to MergeContent process and files that do not match the header I am planning to send those to failures. can this be done .?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 22:51:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172215#M134508</guid>
      <dc:creator>saikrishna_tara</dc:creator>
      <dc:date>2016-08-25T22:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172216#M134509</link>
      <description>&lt;P&gt;You could have RouteOnAttribute processor right before MergeContent, and add a property like foo = ${header:equals("foo")} and then everything with a header of "foo" will be routed to a relationship called "foo", everything else will get dropped.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2016 01:20:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172216#M134509</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2016-08-26T01:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172217#M134510</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363" target="_blank"&gt;@Bryan Bende&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;RouteOnAttribute will know the value of header.? Don't  i have to read the value of first line to know the header.? if i have to read first line then should i use SplitText which i read creates a flow file for each line which i want to avoid as i am trying to move thousands of files . below is a simple flow ..i created 5 files , 4 with header foo and one with a different header. i want to merge all the 4 files with foo as header. tried the approach suggested by you above , but its routing everything to unmatched.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6984-filefilter.png" style="width: 1313px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20009i993C622D7AB99210/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6984-filefilter.png" alt="6984-filefilter.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6985-filefilter2.png" style="width: 974px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20010iA3F44610B8157990/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6985-filefilter2.png" alt="6985-filefilter2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:34:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172217#M134510</guid>
      <dc:creator>saikrishna_tara</dc:creator>
      <dc:date>2019-08-18T10:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172218#M134511</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;As part of requirement need to merge multiple flows using merge content processor , which 
needs to merged using two attributes , as suggested above I have used 
update Attribute before merge content processor and created a new 
attribute and then using this in correlation attribute in merge content. But I am getting multiple files as output,  expecting one file per group .What configuration is needed to handle this ?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Nov 2018 14:59:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172218#M134511</guid>
      <dc:creator>sunny1423</dc:creator>
      <dc:date>2018-11-30T14:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172219#M134512</link>
      <description>&lt;P&gt;Using the below configuration&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="93759-update-attribute.jpg" style="width: 1049px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20007iED28B56ABB1A2D02/image-size/medium?v=v2&amp;amp;px=400" role="button" title="93759-update-attribute.jpg" alt="93759-update-attribute.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="93760-mergecontent.jpg" style="width: 1069px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20008i3A5FB8930C075105/image-size/medium?v=v2&amp;amp;px=400" role="button" title="93760-mergecontent.jpg" alt="93760-mergecontent.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:34:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/172219#M134512</guid>
      <dc:creator>sunny1423</dc:creator>
      <dc:date>2019-08-18T10:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to Merge files together by file attribute in Nifi.?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/287099#M212858</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/53606"&gt;@saikrishna_tara&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/36106"&gt;@bbende&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35439"&gt;@emaxwell&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Thanks for the solution and it worked well for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Nifi and got the same problem statement as&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/53606"&gt;@saikrishna_tara&lt;/a&gt;. I am able to make it till merge content, i can see my files are in parent flow files. but in parent name of files are uuid of the flow files and not the actual name of the file which is processed.&lt;/P&gt;&lt;P&gt;I need to put all the parent flow file's actual name via email processor to the outside world.&lt;/P&gt;&lt;P&gt;Please let me know in case more details are required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nitin&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2020 07:56:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-Merge-files-together-by-file-attribute-in-Nifi/m-p/287099#M212858</guid>
      <dc:creator>tomernitin29</dc:creator>
      <dc:date>2020-01-08T07:56:07Z</dc:date>
    </item>
  </channel>
</rss>

