Hi, In Nifi i would like to query a table incrementally. The issue is I want to query it for the previous 5 minutes not including the last 5 minutes. For example if my process runs at 1:10 and it runs every 5 minutes, i only want the data from 1 to 1:05. This is so that i give a buffer of 5 minutes for my data to be updated. I understand how to use the max value property but that will not provide me a 'buffer' of 5 minutes.
You can use ExecuteSQL processor and keep your timestamp attribute using NiFi expression language to the flowfile which is feeding to ExecuteSQL processor and keep query in processor to get the value from the attribute.
Refer to this link how to store the state using executeSql processor.