Extract the min and max date of the input file

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Extract the min and max date of the input file

suman.das@cuddle.ai
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.
Reply | Threaded
Open this post in threaded view
|

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

Koji Kawamura
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, [hidden email]
<[hidden email]> 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.