Smart data editor

DataGrip provides a smart collection editor that allows you to add, delete, and change fields and documents. All of the queries DataGrip runs during collection updates can later be found in a log, allowing you to easily perform the same changes against another database. DataGrip’s data extractor supports many formats, including CSV, JSON, XML, and others. The mechanism is customizable so you can create your own formats, such as Markdown or just plain text.

On-the-fly coding assistance

Most developers spend the bulk of their time in IDEs coding. DataGrip’s smart features like auto-completion, code snippets, the formatter, refactorings, and various intention actions help you code faster. Concentrate on your logic, not on what you need to type!

Convenience when working with files

If you work with MongoDB scripts stored on your computer, then you might already have a working directory with tons of scripts. DataGrip provides a handy interface for that. Attach folders from your computer, associate them with data sources, run scripts against several databases, or even use the built-in Git integration!

Fully customizable

DataGrip provides many ways to customize the interface. You can choose from any of the default color schemes or create your own, mark data sources with different colors, and even set up your own keyboard shortcut layout.

DataGrip
for MongoDB developers

SQL for MongoDB

You can use SQL to query MongoDB databases. We've created our own JS-SQL translator that makes this possible.

Only SELECT queries work, and the working сlauses are JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET.

A complete post on what is supported is available here.

There are two options in the context menu for each SQL query in Mongo: Copy JS Script to clipboard and Show JS Script. You can edit the query and run it in the JS Script Preview window.

MongoDB Shell support

Most of the commands that you can run in the MongoDB shell are available in DataGrip, and they work in exactly the same way as they do in MongoDB. This is the result of close collaboration between engineering teams at MongoDB and JetBrains.

A detailed description of what is supported can be found in this blog post.

Getting started with DataGrip
for MongoDB

Step 1. Connect to the database

To connect to your MongoDB database, DataGrip uses a JDBC driver, which will be downloaded automatically when testing the connection. In addition to the main credentials you’ll need in order to connect (such as URL, user name, and password), there are several configurable options for your new MongoDB data source:

  • Mark the data source as read-only. In this mode, every updating query will be underlined. A warning will appear if you execute it.
  • Run a keep-alive query and enable auto-disconnect to help you manage connection behavior.
  • Add a start-up script, which is a query that will be run each time you establish a connection.
  • Auto-sync determines whether the database tree should be updated automatically after running queries that modify the database structure
  • SSH/SSL options are also available if you need them.
  • Set the timezone (the default is UTC).

Step 2. Explore database objects

Once you’re connected to one of your MongoDB databases, you’ll see a list of objects in the left pane, called the database explorer. Here you can filter objects and choose which databases should be shown.

Step 3. Query your database

DataGrip can help you detect bugs and problems that are likely to arise in the code of your MongoDB queries before you compile and run it. Here are just a few examples of ways DataGrip can come to the rescue by catching mistakes and bringing them to your attention.