Hi, There's an existing JIRA ticket(NIFI-470) requesting a way to allow a DFM to fine tune how GetFile build it's queues and control how to prioritise the consumption of files.
Would that be what you are looking after? Cheers On 3 Mar 2017 15:55, "prabhu Mahendran" <[email protected]> wrote: Yes, exactly you got my point. Consider the filename contains date, how to prioritze the files from the directory to come first based on the date(oldest date comes first to the latest date comes last)? Issue faced here: Consider I have 2 files in the directory, after the GetFile->SplitText->ExtractText, I used priority attribute in UpdateAttribute. Now each file is initalized with priority 1...10. For file1, each records has 1 to 10 priority value, similarly for file2, each records has 1 to 10 priority value. Actually I want input files to be prioritized based on date in the filename? So that finally, oldest date records will be processed first and then the latest date records. On Thu, Mar 2, 2017 at 6:39 PM, Bryan Bende <[email protected]> wrote: > So in your example you are saying that 10 files get placed in a > directory, and inside each of those 10 files the data is already > ordered the way you want, but you want to ensure the 10 files get > processed in a specific order? > > If that is true, what determines the order of the 10 files? is it > based on the order they were written to the directory? or is there > something in the filename that indicates which file comes first? In > order for NiFi to prioritize these files, there has to be something > that tells NiFi what the priority is. > > On Wed, Mar 1, 2017 at 11:56 PM, prabhu Mahendran > <[email protected]> wrote: > > As you suggested, setting 3 UpdateAttribute may be tedious. Suppose I > have > > more than 10 flowfiles setting 10 updateattribute processor is lengthy > one. > > This case also not possible for dynamically generating flowfiles. > > > > > > > > How to set priority attribute for the flowfiles from Getfile? Suppose I > get > > 10 files in the Getfile processor, based on my priority I have ordered > the > > flowfile each line in the files till PutSQL. Here without considering the > > order, based on the filecreation time, data is moved without my ordered > > records. For this case only I decided with the > PriorityAttributePrioritizer > > and used UpdateAttribute processor. > > > > > > > > I can able to set the priority attribute for each line in the file, but > not > > each files from GetFile. Can you suggest any solution? > > > > > > > > > > On Wed, Mar 1, 2017 at 7:18 PM, Bryan Bende <[email protected]> wrote: > >> > >> I just responded to this question on stackoverflow: > >> > >> > >> https://stackoverflow.com/questions/42528993/how-to-specify- > priority-attributes-for-seperate-flowfiles > >> > >> Thanks, > >> > >> Bryan > >> > >> On Wed, Mar 1, 2017 at 5:19 AM, prabhu Mahendran > >> <[email protected]> wrote: > >> > I need to use PrioritizeAttributePrioritizer in NiFi. > >> > > >> > i have observed that prioritizers in below reference. > >> > https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#settings > >> > > >> > if i receive 10 flowfiles then i need to set the priority value for > >> > every > >> > flow file to be unique. > >> > > >> > After that specify queue configuration must be > >> > PrioritizeAttributePrioritizer. > >> > > >> > Then processing flowfiles based on priority value. > >> > > >> > How can i set priority value for seperate flow files or which > >> > prioritizer in > >> > Nifi to be work for my case? > > > > >
