Introducing MongoDB Shell in DataGrip

Maksim Sobolevskiy

Hi! We’ve released the new version of the MongoDB JDBC driver, which means that DataGrip now includes support for the new MongoDB Shell out of the box. This is the result of a close collaboration between engineering teams at MongoDB and JetBrains, and we are excited to finally release it to all our users.

If you use DataGrip to work with MongoDB and Atlas, you get a console/shell experience that is 100% consistent with what you get in MongoDB’s own shell and other MongoDB developer tools.

To use the newest version of the driver, just update it in the properties window of your MongoDB data source.

Screenshot 2020-06-16 at 13.01.50

New features

All the commands that you can run in the MongoDB shell are now available in DataGrip and other JetBrains IDEs, and they work in exactly the same way as they do in MongoDB. Here’s the overview of what’s now available.

Calling up the help field works.

Screenshot 2020-06-16 at 13.01.57

More methods for cursors: explain, projection, close, isClosed, hasNext, next, isExhausted, itcount, map, tailable, toArray, readPref, and readConcern.

Screenshot 2020-06-16 at 13.02.02

New methods for working with collections: db.getCollectionInfos(), db.getCollectionNames(), and db.collection.remove().

Screenshot 2020-06-16 at 13.02.21

You could previously create many types of BSON objects, but not all of them. This new update adds support for the ones that were missing: Date, HexData, and MD5.

Screenshot 2020-06-16 at 13.02.25

Before, only two bulkWrite options were supported: insertOne and deleteOne. Now updateOne, deleteMany, updateMany, and replaceOne are supported, as well.

Screenshot 2020-06-16 at 13.02.33

The readConcern and writeConcern options are supported for all commands, for example aggregate, bulkWrite, count, and others.

Screenshot 2020-06-16 at 13.02.40

Bug fixes

We’ve fixed two important bugs related to working with JS arrays: DBE-9859 and DBE-10001.

Regression

A known issue: collections with periods in their names cannot be used in commands, but there is a workaround:

Screenshot 2020-06-16 at 13.02.44

A great fit for Atlas Data Lake

DataGrip works well with MongoDB deployments, whether self-managed or in Atlas. It also works with Atlas Data Lake. If you have data stored in Amazon S3 and you want to query and analyze it with MQL, you can create a Data Lake and start working with it right away.

Screenshot 2020-06-16 at 13.03.28
Create an Atlas cluster, add some sample datasets, download DataGrip, and share your thoughts with us!

DataGrip and MongoDB teams