nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Kravzov <igork.ine...@gmail.com>
Subject Best way to compare dates
Date Thu, 09 Jun 2016 14:37:52 GMT
Hi,

In my workflow data is coming form Kafka Topic in JSON format and saved ot
HDFS directory by day.

HDFS directory path constructed as /mypath/${now():format("yyyyMMdd")}
JSON file contains attribute {... "adddate":"2016-06-07 17:06:17" }

I want to avoid over-spill of a previous date files into "today's"
directory.
The thing is if add date is the same as taday's date, a want file merged to
a bigger file and save to HDFS. Previous file not merged and saved as is.

I am thinking to use EvaluateJsonPath to grab add date and to use
RouteOnAttribute to direct to appropriate  path.

How comparison would look like?

Thanks in advance.

Mime
View raw message