What's New in DataGrip 2020.1

Run configurations

This concept is already in use in our other IDEs, and it’s now come to DataGrip. In general, if you want to run something, you just need to create a configuration for it. Let’s look at how this can help you with particular tasks.

Configuration for running script files

Configuration for running script files

Before, you could only run files one by one. This could be especially frustrating if the files included dependencies and the order was crucial. Now, you can run several files at once.

Configuration for running script files

Choosing to run multiple files creates the run configuration. In this configuration, you can reorder the files, add new ones, and run other programs or configurations before launch.

Your run configuration will be saved automatically. If you want to run this configuration several times but you only want to change the target, tick the Show this page checkbox, which will offer you the option to change the target, as well as some other options, every time you run the configuration.

Configuration for running code

Configuration for running code

You can also create a configuration that will run a saved snippet of code.

Configuration for running code

Managing run configurations

Saved run configurations can be found either on the Navigation bar or in the Run menu.

Configuration for running code

There you will see the list of all configurations you have.

Test frameworks support

Test frameworks support

utPLSQL

utPLSQL is a popular framework for testing PL/SQL code in Oracle databases. We’ve built support for it, which means that you can now run tests and test packages without having to leave the code editor. Just click the small green play button in the left-hand pane.

Test frameworks support

A temporary configuration is created with each run. It will be deleted after some time, but you can create a permanent configuration in the utPLSQL section. We’ve also added Run by tag functionality.

Test frameworks support

tSQLt

DataGrip 2020.1 also adds support for tSQLt, the test framework for SQL Server. To run one or more tests from the database explorer, press Ctrl+Shift+F10.

Test frameworks support

Here you can see the results of the tests:

Data editor

Results in editor

Results in editor

Now you can see results in the code editor. We hope this will fit nicely into the workflow of many of our users. To turn it on for the whole IDE, use: Settings/Preferences | Database | General | Show output results in the editor.

There is also a button on the toolbar that toggles between the two modes only for the current file.

Geo viewer

Geo viewer DataGrip-only

To get a view of the geographical data in the data editor, click the Gear icon and then select Show Geo Viewer.

The geo data viewer works only if JCEF is enabled.

In rare cases, enabling JCEF might crash the IDE. This can happen if you have installed plugins that use JavaFX. In the unlikely event that this crash happens to you, here are the instructions for recovering your IDE:

  1. Locate the config folder of your IDE (for help see this).
  2. Locate the file <config folder>/options/ide.general.xml
  3. Remove the following line from ide.general.xml:
    <entry key="ide.browser.jcef.enabled" value="true" />

If you run into any difficulties, please contact us at support@jetbrains.com.

Filtering data in MongoDB

Filtering data in MongoDB

We’ve added support for filtering in the data editor for MongoDB.

Export options

Export to Excel

Export to Excel

Finally!

Better usability

Better usability

In this release cycle, we have focused on making exporting more user-friendly.

First, we’ve cleaned up the menu:

Better usability

And second, we’ve created a dialog window for exporting:

Text data viewer

Text data viewer

You can now observe tables or results in the text format. Choose your preferred data format in the extractor drop-down.

Connectivity

New authentication options

New authentication options

We’ve added support for pg_pass in PostgreSQL:

New authentication options

We’ve also added the ability to use the domain credentials for the SQL Server if you’re using the jTds driver. This used to be way more complicated and required a lot of configuration in the Advanced tab. That’s no longer the case!

Shared SSH configuration

Shared SSH configuration

Now you can create a configuration for the SSH tunnel and use it in many data sources or even projects.

Query console

Update preview

Update preview

There is a new preview intention action for the UPDATE statement. Using this action will cause DataGrip to simply run a SELECT statement with the same WHERE clause.

To run it, first press Alt+Enter on the UPDATE statement and then choose Preview update.

Update preview

And voila! DataGrip will add columns with the new values next to the old ones.

Easy navigation to Execute settings

Easy navigation to Execute settings

If your file contains several queries, when you run one of them you’ll see the chooser. Some people love this chooser, but some don’t. We’ve made it easier to customize the behavior of the Execute action.

Easy navigation to Execute settings

The Customize link pictured on the left will lead you to Settings/Preferences, where you can define whether you want to see the chooser or always run the statement under the caret. You can also choose another type of behavior.

Datetime injection

Datetime injection

Now, if you use DATE before a string literal to convert it, DataGrip understands that this string contains a date and highlights it accordingly. The IDE also warns you if something is wrong with this data.

At the moment, this feature only works with this type of conversion for MySQL, Oracle, DB2, and H2.

Better coding assistance for MongoDB

Better coding assistance for MongoDB DataGrip-only

MongoDB now has:

  • Resolution and completion for collection names.
  • Completion for methods.

Navigation and search

Context data sources scope

Context data sources scope

It’s possible to search for an object in the context data source, which is the data source you are working with at the moment. The context can be defined either from the console you are working with, the data editor, or by selecting it in the database explorer.

If you select several data sources, the search will be performed in all of them.

Structural Search

Structural Search

This is another concept from other IDEs that is making its way to DataGrip. At the moment, our implementation of it is very basic. You can search for types, expressions and clauses.

To learn more about how it works, please visit the corresponding documentation page.

Working with files

CSV file type

CSV file type

DataGrip now has a registered *.csv file type. This means that you will no longer get a notification about CSV supporting available plugins. DataGrip also has the ability to edit CSV files as tables. You will see a floating toolbar with the Edit as Table button.

CSV file type

If you click this button and define the CSV format in the corresponding dialog, then the editable table with the content of your CSV file will open. Two tabs for the file become visible: Text and Data.

Attach directory

Attach directory

The File | Open menu now attaches the directory to the project. Just to be clear, the attached directory is the directory you see in the Files tool window.

Mark as plain text

Mark as plain text

If you need to edit a really huge script, you can now mark it as plain text and open it for editing. Highlighting and coding assistance will be off, so you can modify it without any performance lag.

Database tree view

Database tree view

We’ve introduced a UI for creating users and roles. We’ve also enhanced the UI for creating schemas and databases. It is now possible to define various attributes and comments.