Thanks Joe. The UpdateAttribute processor can be helpful for my case. Also is it possible to push only the attributes to Mongo? I could see an AttributeToJson object but it seems to be appending the information in flow file content or attribute. What is a good way to capture only attributes and send it to MongoDb?
On Tue, Feb 2, 2016 at 8:42 PM, Joe Percivall <[email protected]> wrote: > Hello Sudeep, > > How precise do you need the date/time to be? What you could do is add an > UpdateAttribute processor[1] after ingesting which uses the Expression > language functions "now" [2] and "format" [3] to add the date/time down to > the millisecond. > > There would of course be a bit of error between when it was ingested and > when it is processed by UpdateAttribute but UpdateAttribute is very fast > and there may actually not be any measurable delay. > > [1] > https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.attributes.UpdateAttribute/index.html > [2] > https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#now > [3] > https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#format > > Hope that helps, > Joe > - - - - - - > Joseph Percivall > linkedin.com/in/Percivall > e: [email protected] > > > > On Tuesday, February 2, 2016 1:17 AM, sudeep mishra < > [email protected]> wrote: > > > > Hi, > > I need to create some audits around the NiFi flows and want to add the > time a flow file was received by a particular processor. Is there a way to > add this date in the attributes for flow files? > > I can see a date in the 'Details' section for a data provenance entry but > can we get such a date in the attributes as well? > > > Thanks & Regards, > > Sudeep > -- Thanks & Regards, Sudeep
