Is this possible to run update statement for Mongo? I am trying to run the following query to update a document but it does not seem to be working. Can anyone please help?

{
	"collection": "Cities",
	"update_one": [{
			"CityID": "2001"
		},
		{
			"$set": {
				"CityID": "2020"
			}
		}
	]
}

I don’t think Redash supports update statements for Mongo. It says in the documentation:

During execution, Redash will convert [your query] into either a db.collection.find() call or a db.collection.aggregate() call.

Neither of those can update the database.

1 Like

Thank you for explaining it to me.