How to perform MongoDB Write?

I am trying to update a single row in MongoDB as part of a ReTool dashboard. I am not able to make the selections I need to because it appears to confuse the collections in the database for the fields on objects in the collection.

Here is an image showing what I see: Imgur: The magic of the Internet
"sessions" is a collection, all of the items in the dropdown are collections, and if I try to add anything after the collection name it doesn't persist once I leave the text box.

If I remove the filter and try to run it I get an error anyway: "The datasource the query is connected to used to be of type RetoolTableQuery has changed types, and is no longer valid!"

I have already changed from using the write connection type to the read type based on this post: MongoDB Write Resource is not working The same UI issues show up if I keep it in write mode, but the error string above changes to the same shown in the post I just mentioned if I put it in write mode.

Please unblock me on making this query to update a value. Is there some way to just write a regular mongo json query?

Hi @Jack_Michalak

We are tracking this bug, so I'll keep you posted if we ship a fix! I'm not sure what causes it yet, since I haven't been able to reproduce it.

Any chance you could take these steps to help with troubleshooting:
-Send me an app JSON export with a query to this resource (I won't actually have access to your resource, but maybe it can help us narrow things down)
-Try creating a brand new resource from scratch with the same credentials - is the issue reproducible?

1 Like