nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzhu <js.tianlu...@gmail.com>
Subject How to count the number of occurrences of a certain string in file
Date Mon, 06 Nov 2017 20:58:58 GMT
Hi,

I have a text log file. I want to count the number of occurrences of strings
in the file and store it in a SQL table. For example, I want to count the
number of times the string "Established connection to server" present in the
file as TOTAL_CONNECTIONS and the number of times "Lost connection to
server" existed in the same file as TOTAL_DISCONNECTION.

I don't know how I should count the strings in this case. I find this blog
as a template:  https://www.batchiq.com/database-injest-with-nifi.html
<https://www.batchiq.com/database-injest-with-nifi.html>   Maybe I can
modify things from this?

Any suggestions would be appreciated.

Thanks,

Tina



--
Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/

Mime
View raw message