Created on 09-20-2017 05:45 PM - edited 08-18-2019 12:27 AM
I have flowfiles named as (1,3,4,5 and etc) i use this ${filename} attribute for invoking online service, then i got big response and split it line by line but at the end i need to merge my flowfiles based on their name i think mergecontent doesn't work prperly i use Correlation atribute name -filename and i have also increased minimum and maximum number of entries but nothing helped me here is my workflow:
also there is several subject i am interested in:
Created on 09-20-2017 06:31 PM - edited 08-18-2019 12:26 AM
@sally sally, if you are having filename attribute then make use RouteonAttribute processor to get same filename files into one MergeContent processor. by this method all the same filename flowfiles comes to one mergecontent processor will help to resolve issues with merging the flowfiles.
RouteonAttribute Properties:-
To get only filename 1 from the flow files
${filename:equals('1')}
Example:-
RouteonAttribute:-
Make use of Property 1, 2 and connect 1, 2 relationships to two seperate merge contents..
Created 09-21-2017 05:12 AM
Ok ,but as i guess i will havee to add one routeOnAttriute for each fileaname what can i do if i have more than 100 filenames?
Created 09-21-2017 05:14 AM
should i change correlation attribute name with something else?( i mean with different attribute)
Created 09-24-2017 12:23 PM
@sally sally, i think if you need to merge files based on filename then you have to use those many merge content processors(e.g if 100 filenames you need to have 100 merge contents).
Can you please share more details about your merging strategy on what basis you are merging the flow files is it based on size(or) some thing else? and can also share us the configs that you are using now to merge content based on filename?