4
votes

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: enter image description here

also there is several subject i am interested in:

  1. I think that main reason my mergecontent doesn't work properly is that my file names don't go one after another , can this bean real reason?
  2. Can you reccomend me any better solution for such task?
1
In order to use Correlation Attribute of filename, all your flow files would have to have the same value for filename so that MergeContent could identity flow files with the same filename and merge them together, but you first stated that the flow files are named (1, 3, 4, 5, etc) so its not going to work if they don't have the same name. - Bryan Bende
ok i seems i didn't make my question clear if after splitting flowfiles i have flowfiles with name (1,1,3,1,1) it means mergecotent would't recognize it? - user7516956
how can i mange it in s way that it can work properly? - user7516956
should i use another thisn for corelaton atribute name ? - user7516956

1 Answers

3
votes

Simple trick, you should be using filename as its asking for correlation attribute name instead of ${filename}

enter image description here

PS: i guess this answer is 2years late, well you never know whom it will help :P