Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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