Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi origin processor name or id as attribute

avatar
Expert Contributor

Is it possible to place a NiFi processors name or id to a flowfile that it outputs? For example a Processor InvokeHTTP I named as CallRESTEndpoint, the flowfile that would come out of it will have attribute, like origin:CallRESTEndpoint? Or if possible to create a chain of origin that will append the processor's name or id to this attribute.

I need this in error / failure handling. If you can share a better idea in tracing errors / failure, that'd be a good idea. (But please answer the original question also, if there is one.)

3 REPLIES 3

avatar
Super Mentor

@J. D. Bacolod

I like the idea of creating an attribute of FlowFiles that are routed to a failure relationship that will identify which component routed that FlowFile. I suggest opening an Apache Jira for this enhancement. For now you can use NiFi's data provenance capability to get the lineage of FlowFile that was processed by your dataflows. Lineage can be used to show all routing and processing done for a given FlowFile. It will not provide details on the reason the FlowFile was routed to failure. Once you have the timestamp of the failure event, you can look up the details in your nifi-app.logs.

Thanks,

Matt

avatar

Having ...

  • lastProcessorName and/or lastProcessorID
  • success (boolean)

... attributes on a FlowFile would be fantastic.

I have a use-case where being able to use an `InvokeHTTP` processor to "chirp" back the success/failure of each step in the processing pipe would be fantastic.

avatar
New Contributor

@Matt Clarke I have created a Jira ticket for this enhancement: https://issues.apache.org/jira/browse/NIFI-4284