Support Questions
Find answers, ask questions, and share your expertise

[Nifi] filter on date using queryRecord processor

New Contributor

Hello everyone, 


I'm new with Apache Nifi, i'm trying to filter on a date column with the format yyyy-mm-dd using the queryRecord processor. Data come from CSV file. What i want to do is to filter and keep all records that have the column date greater or equal than the current date, i tried: 


select * from flowfile where date >= currentDate();


But that does not work


if it is not possible with the queryRecord processor, which one can achieve that ?


Does anyone have an idea ?


Thanks in advance 


New Contributor

You will need to use the Calcite current_date equivalent, like so:


SELECT * FROM flowfile WHERE date >= {fn CURDATE()}


Hope this helps!


See here for more Calcite definitions:

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.