Execute Raw query with query editor
Currently there is no query editor for executing raw queries, like for batch update and batch delete. Consider to add a query editor.
-
AdminBetsy (Admin, MongoDB) commented
Hi, we are considering building a raw query editor. I would also like to call attention to the bulk update and bulk delete features that were added to Compass earlier this year in version 1.42.0, since that use case was raised in the original request.
Here are documentation links describing how to use these features:
https://www.mongodb.com/docs/compass/current/documents/modify-multiple/
https://www.mongodb.com/docs/compass/current/documents/delete-multiple/(Edited by admin) -
Adam commented
I have been putting off using Compass as my go-to DB client for lack of this feature, relying instead on other tools.
I would love to be able to write my own queries, format them how I like - including all the "options" that force me to click into other text boxes - and execute them - preferably with Ctrl+Enter, as the MongoDB Visual Studio Code Extension does.
-
Kai commented
-
Kai commented
This is the main reason why we cannot get rid of our current MongoDB IDE. It's very useful to be able to write javascript code to access MongoDB for various purposes, like creating reports and analyzing the data.
Duplicate (with more votes): https://feedback.mongodb.com/forums/924283-compass/suggestions/40604416-execute-raw-query-with-query-editor
-
Matthew commented
IHAC who has requested this feature as well -- their DevOps team has 100+ shell queries that need to be run (validations, reports, etc) and they currently cannot use Compass for this use case.
-
Igal commented
I'd love to have this feature in MongoDB Compass.
It's the only reason I still use another client (Studio3T).When this is implemented, I can see myself switching to Compass.
-
Adnane commented
For now, there is only a shell but why not have an editor with a MongoDB file extension so we can save and load MongoDB scripts like with MySQL Workbench?
-
AdminMassimiliano (Admin, MongoDB) commented
Just wanted to mention that MongoDB for VS Code could be a viable option for this, if you are looking for an environment that is more editor based: https://www.mongodb.com/products/vs-code.
We are debating whether we should have similar functionality in Compass though.
-
Romain commented
@Mark I just went there to upvote this and found your reply. I didn't know about NoSQLBooster but it's the GUI I've been looking for... The default theme is a bit ugly but it has a lot a features currently missing on Compass (raw queries, autocompletion, saving favorite scripts, queries history, etc...)
-
Mark commented
Totally agree. @Massimiliano - no, the embedded shell is nice, but not adequate. You really should study what NoSQLBooster does with their UI.
For a professional developer, the most important requirement is that you can cut and paste between your code and the query tool (i.e. Compass). For example, if I'm trying to debug a 100 line aggregation pipeline query, I need to be able to copy that from my code into the tool and immediately start debugging (i.e. editing the query and testing). Until Compass has this capability, I won't consider it.
Thanks.
-
Wei Lun Yong commented
Thinking to have a query editor with auto complete.
-
AdminMassimiliano (Admin, MongoDB) commented
Compass 1.22 comes with an embedded shell. Is that close enough to what you are looking for?