<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How do we find the time difference between contents of a flowfile and assign them to a attribute? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-do-we-find-the-time-difference-between-contents-of-a/m-p/282745#M210178</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70617"&gt;@Raghu_daredev&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Just to me clear, the timestamps you want to compare are part of the json content of each FlowFile before the mergeContent or are you trying to compare the timestamp NiFi assigns to each FlowFile when it is created in NiFi.&lt;BR /&gt;&lt;BR /&gt;If it is in the JSON content, you could use the EvaluateJsonPath processor to extract the timestamps in to NiFi attributes and then compare those individual timestamps in a series of NiFi EL statements in a single UpdateAttribute processor (assuming the exact same number of merged FlowFiles in each new Merged FlowFile).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it based in timestamp created by NiFi when they became FlowFiles, this becomes more challenging.&amp;nbsp;&lt;BR /&gt;While it is possible to persist these individual timestamp to a unique attribute on each FlowFile allowing them to persist as those unique attributes in the new merged FlowFile, the uniqueness is going to make it impossible to reference them in NiFi EL statements.&lt;BR /&gt;You may need to add the timestamp value to the source JSON before the merge so that it can be extracted numerically via EvaluateJsonPath after merge.&lt;BR /&gt;&lt;BR /&gt;Matt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2019 15:33:36 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-11-12T15:33:36Z</dc:date>
  </channel>
</rss>

