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.
![](https://secure.gravatar.com/avatar/1051506284f3e02639129f82e00af60a?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
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?