Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Get files using ListFile but filtering by its name that has a date inside it

avatar
New Member

Hello everyone, please help!

I have files whose name is formed by a date in the format "yymmdd", for example:


TRB_ASE_D190125.txt

TRB_TIT_D190125.txt


I need to get only the files whose names match the current date. For example, if the date was "190125", the 2 subsequent files would match that criterion.

I am using the ListFile processor to get the files and put this regular expression using the "now" function in the File Filter, but it does not work:


^TRB_[A-Z]+_D${now():format('yymmdd')}.TXT


Thanks in advance!

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Mario Tigua

The File Filter property in the listFile processor does not support NiFi Expression Language. If yo float your cursor of the question mark icon to the right of a property name it will display a pop-up window that will tell you if this property will support NiFi expression language.
-

This property expects a java regular expression instead.

-

Thank you,

Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Mario Tigua

The File Filter property in the listFile processor does not support NiFi Expression Language. If yo float your cursor of the question mark icon to the right of a property name it will display a pop-up window that will tell you if this property will support NiFi expression language.
-

This property expects a java regular expression instead.

-

Thank you,

Matt

-

If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.