You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "suman.das@cuddle.ai" <su...@cuddle.ai> on 2017/05/30 10:58:13 UTC

Extract the min and max date of the input file

Hi ALL,

I want to extract the min and max date of the input csv file. I have a date
column in that file.
Also please let me know how to add some custom attribute depending on the
date column value.

Any help would be appreciated.



--
View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Extract-the-min-and-max-date-of-the-input-file-tp16012.html
Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Re: Extract the min and max date of the input file

Posted by Koji Kawamura <ij...@gmail.com>.
Hello.

Sorry for the late reply.

If you are free to use the latest version, Apache NiFi 1.2.0 includes
very powerful processors for your use cases:

QueryRecords can query record using aggregate functions such as min, max, avg.
A NiFi template as an example to calculate min, max and avg from a CSV
file is available here on Gist
https://gist.github.com/ijokarumawak/45a609936239a0cdfc4599a576386d42

You may find Mark's blog useful for more details, "Real-Time SQL On
Event Streams"
https://blogs.apache.org/nifi/entry/real-time-sql-on-event

Thanks,
Koji

On Tue, May 30, 2017 at 7:58 PM, suman.das@cuddle.ai
<su...@cuddle.ai> wrote:
> Hi ALL,
>
> I want to extract the min and max date of the input csv file. I have a date
> column in that file.
> Also please let me know how to add some custom attribute depending on the
> date column value.
>
> Any help would be appreciated.
>
>
>
> --
> View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/Extract-the-min-and-max-date-of-the-input-file-tp16012.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.