Thank you for the responses Aurelien and Abdou. That reminded me that the
ListFile processor I'm using could filter with min and max age. That should
work for my use-case, as the files should only get generated once daily.

Scott

On Thu, Sep 13, 2018 at 5:43 AM Abdou B <[email protected]> wrote:

> Hello,
> Did you tried the standard processors getfile ?
> Minimum File Age + Maximuin File Age / Polling Interval  should get the
> job done ?
>
> Best Regards.
>
>
> Le jeu. 13 sept. 2018 à 13:50, DEHAY Aurelien <[email protected]>
> a écrit :
>
>> Hello.
>>
>>
>>
>> Simpliest solution in my opinion, rather than trying to do that entirely
>> in nifi, is to use an shell script and run it via ExecuteStreamCommand as
>> an input for FetchFile.
>>
>>
>>
>> -- Aurélien
>>
>>
>>
>> *From:* scott [mailto:[email protected]]
>> *Sent:* mercredi 12 septembre 2018 16:56
>> *To:* [email protected]
>> *Subject:* How to only get the newest flowfile from a queue
>>
>>
>>
>> Hello community,
>>
>> I'm trying to figure out a flow that will run periodically to process the
>> latest file in a directory. If the flow doesn't run for a while, there may
>> be multiple files found. My logic does not need to process the older files
>> because the newest file always trumps the older ones, and older files can
>> be discarded. Is there a way to filter the content of a queue this way?
>>
>>
>>
>> Thanks,
>>
>> Scott
>>
>> This electronic transmission (and any attachments thereto) is intended
>> solely for the use of the addressee(s). It may contain confidential or
>> legally privileged information. If you are not the intended recipient of
>> this message, you must delete it immediately and notify the sender. Any
>> unauthorized use or disclosure of this message is strictly prohibited.
>> Faurecia does not guarantee the integrity of this transmission and shall
>> therefore never be liable if the message is altered or falsified nor for
>> any virus, interception or damage to your system.
>>
>

Reply via email to