Block (or cut) the contents of the FlowFile

I need to execute an HTTP post from NiFi, but I don't want / need a request to transfer all of the FlowFile content.

Is there a way to pass the FlowFile attributes but not the full content?

+3


source to share


1 answer


If your Http Post's request body is JSON, you can use the AttributesToJSON Processor, which allows you to choose which attributes you want to include in the resulting JSON. You can then configure the processor so that the resulting JSON will overwrite the existing content of the stream file.

Be aware that the resulting JSON will be flat, so you may need to convert it to the expected format. You can use JoltTransformJSON Processor for this.



Below is an example of what your data stream might look like. Hope this helps!

enter image description here

+3


source







All Articles