Hello NiFi community, We have implemented NiFi's FlowFileTransform API for Python processors in MiNiFi C++, and we have written a few processors using it. We have noticed that the "failure" relationship works like this: if the transform() method returns FlowFileTransformResult(relationship="failure", contents=some_contents, attributes=some_attributes), then - some_contents are discarded, - some_attributes are merged with the attributes of the original flow file, - and then the original flow file with the merged attributes is routed to the failure relationship. [1]
The fact that the contents are discarded was unexpected to me, and it is not documented in the developer guide [2]. We could add this to the developer guide, but I think it would make more sense if the failure result worked in the same way as the success result: if contents is None, then we use the original contents, but if contents is not None, then it becomes the new contents of the flow file which is routed to the failure relationship. What do you think? Ferenc [1] https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-py4j-bundle/nifi-py4j-bridge/src/main/java/org/apache/nifi/python/processor/FlowFileTransformProxy.java [2] https://github.com/apache/nifi/blob/main/nifi-docs/src/main/asciidoc/python-developer-guide.adoc