Support Questions

Find answers, ask questions, and share your expertise

How do you configure a PutMongo NiFi Processor ?

avatar
Contributor

How do you configure a PutMongo NiFi Processor with ID as the primary key used to select the document and updating 2-3 fields inside the document with user defined attributes?

 

What I have so far and it errors out : 

Update Query--> {my_id:${my_id},$set:{['a']['b']['exists_in_file']:"True"}}

2 REPLIES 2

avatar
Master Collaborator

There are two aspects of your question "How do you configure a PutMongo NiFi Processor "

 

1. Connection details:   Connection URL, User Auth, Wire encryption (SSL )

2. Actual Query: make sure query syntax is correct.

 

If you can post an error snipped and snap from the processor config to be able to isolate if this query issue or connection issue.

Assume if this is with query-related issue , then you can verify if the same query works from the generic mongo db client? if not then same query will not work from nifi:PutMongo as well. 

 

Thank You.

 

 

 

avatar
Contributor

Could you probably give me an example of how to frame a Mongo query in NiFi ?

My key to select the record is "my_id", which I get from an evaluate json path processor. The Columns that I want to update is a nested json key like so : ['a']['b']['exists_in_file']. The query that I now have in update Query Key is : {"$my_id":["a.b.exists_in_file":"True"]}. 

 

This errors our saying : BasicDBList cannot be cast to java.util.Map