0
votes

I am trying to insert a document into mongodb using apache NiFi. I want to insert a document just from Flow File attributes but not the Flow File content.

I have tried using PutMongo processor but it insert the content of the Flow file which I don't want it to insert. I need to insert a custom document by using the flow file's attributes.

2

2 Answers

2
votes

You can use a processor like AttributesToJson, or ReplaceText, to overwrite the flow file content with the attributes that you want to use for the Mongo document.

0
votes

You can use Jolt JSON for customizing or limit your attribute.

https://jolt-demo.appspot.com/#inception