What’s New in DataGrip 2024.2

DataGrip 2024.2 is out!

This is the second major update of 2024, and it’s packed with various enhancements. Let’s take a closer look at the new features and improvements.

Download

The new UI has become the default

First and foremost, the new UI is now the default for all users.

The new UI for JetBrains IDEs was introduced two years ago, and since then, we have been continuously refining it. We’ve diligently collected your feedback and improved the look and feel of our IDEs to ensure a smooth and gradual transition. Over the last few releases, we’ve seen high adoption rates for the new UI, and we’ve addressed the main issues based on your feedback.

We now believe the new UI is ready for everyone. Starting with the 2024.2 version of JetBrains IDEs, the new UI will become the default option.

If you prefer the classic UI, you can still use it by installing the corresponding plugin, which is available on JetBrains Marketplace.

AI Assistant features

We have been hard at work developing and improving the AI Assistant plugin for DataGrip. In this release, we’re introducing lots of features for working with databases.

Text-to-SQL

Ask AI Assistant to generate SQL code right in the editor. To do so, click the Generate Code with AI button on the editor toolbar and enter your prompt. An example prompt might be: “Add queries that will create a books table and populate it with three sample rows”.

After AI Assistant generates the code, you can accept the result, regenerate it, or specify your prompt by clicking the corresponding buttons at the bottom of the suggestion pane. You can also take the generated code to the AI chat to ask AI Assistant any questions you may have about the code.

Mentioning database objects and files in the AI Assistant chat

You can attach your database schema to the AI Assistant chat by mentioning it in your prompt. To do this, enter your prompt using # followed by the database schema name, for example: “Give me the query to get all actor names from #public.”

AI Assistant will then analyze your schema and generate the query.

This feature is particularly important for other JetBrains IDEs, as they have no other way of attaching database schemas to the AI chat.

You can also mention files from the attached folder, which is useful when you want to provide a particular script to AI Assistant as context.

Explain and fix SQL problems using intention actions

Now, you can use AI Assistant to better understand and fix SQL problems. For any problems with a severity level higher than Weak warning, AI Assistant will suggest an explanation and a fix.

To get an explanation, invoke the intention actions by selecting the highlighted code and pressing ⌥⏎ / Alt+Enter, selecting AI Actions, and then Explain SQL problem under caret. AI Assistant will then provide the explanation in the chat.

To fix the problem, in the AI Actions popup window, select Fix SQL problem under caret. AI Assistant will replace your SQL code with the corrected code.

This feature can require attaching the database schema to suggest proper explanations and fixes.

Modify tables

AI Assistant can now help you with modifying tables. In the Modify dialog, click the AI Assistant button to invoke the AI Assistant dialog, where you can ask AI Assistant to do what you need, for example: “Switch all the VARCHAR data types to CHAR”.

Once AI Assistant generates the requested code, you’ll be able to view it in the preview pane of the dialog.

Working with data

Scripted loaders: customizable import

You can now import data from your tabular data files. We’ve implemented scripted loaders to enable importing for the following file formats:

  • Excel
  • JSON
  • Parquet
  • Shapefile

To import the data, drag your file from the Files tool window to the schema in the database explorer and configure the import settings in the Import dialog.

Additionally, DataGrip can now display the contents of your tabular data files in the data editor. To open the files, simply click them in the Files tool window. To disable the feature, go to Settings | Advanced Settings, find the Open file as table if detected by scripted loader setting, and select None.

Important! The loaders are scripted, which means you can write and use your own custom ones. To add custom scripted loaders, place them in their specific directory in Scratches and Consoles | Extensions | Database Tools and SQL | data | loaders.

Geographical data viewer for tabular data files

Our Geo viewer lets you explore the geographical data stored in CSV and XLSX files, as well as in files with other supported formats.

Navigation to Related Rows in floating toolbar

Now, you can get to related rows much easier by using the table cell's floating toolbar. Just click the cell and then click the Related Rows icon on the floating popup toolbar.

To remove this action from the floating toolbar, open the toolbar, click More, and then select Customize This Toolbar. In the Customize Grid Floating Toolbar dialog, select the action, and click Remove. You can restore the action by going to Settings | Appearance & Behavior | Menus and Toolbars, selecting Grid Floating Toolbar, and then clicking Add.

We’ve also simplified the flow of this action. Previously, its behavior options would appear in a popup window after selecting an action in a cell’s context menu. We’ve now moved the behavior options to the Related Rows action behavior selector, which you can find under Settings | Advanced Settings. The Navigate And Select First option will select the first referenced rows and show all the rows in the table. The Navigate And Filter All option, on the other hand, will show the referenced rows only.

Open web links via floating toolbar

You can now also open web links with the new floating toolbar.

The feature is turned off by default for security reasons. You can enable this feature via URL Click Settings in Settings/Preferences | Database | Data Editor and Viewer.

Automatic value completion

We’ve now decided to make value completion – a long-standing feature of DataGrip – automatic. We’ve tested the feature’s performance, and it looks promising. Keep in mind that this feature is 100% local, so completion variants are based on the current column’s other values that have already loaded.

Selecting columns

Previously, the only way to select all values in a column was with the Expand Selection shortcut: ⌥↑ / Ctrl+W. Now, it's possible to select all values in a column by clicking on the column’s header.

The functionality to sort values in a column is still available, however, you now need to click on the corresponding icon to sort the column’s values.

Search Everywhere popup

Filtering

We've enhanced the Database tab in the Search Everywhere popup! You can now filter search results by database object type. There are two ways to do this.

First, you can use the filter icon in the top-right corner. The names of object types by which you can filter results include:

  • Databases & Schemas: database, external-database, external-schema, schema
  • Tables: table, view, materialized-view, virtual table, foreign-table, and others
  • Scripting: function, stored procedure, aggregate, package, partition-function, and others
  • Types: alias-type, collection-type, object-type, table-type

The other way to filter search results by object type is using commands. Enter / followed by the object type and then the object name. For example, entering /tables will result in a list of introspected database tables, and /tables film will find the tables that have "film" in their names.

Preview

The Search Everywhere dialog now includes an option to preview the codebase elements you’re searching for. Enabling this feature through the Preview icon on the dialog’s toolbar will cause a preview pane to appear under the search results, offering additional context and making it easier to navigate through your project.

Better scopes

We're reworked the scopes drop-down list so that data sources are now shown at the top.

There’s also a new Cached Database Sources scope in the Text tab which allows you to search inside the source code of your databases’ functions, views, etc.

Connectivity

Smart refresh

SQL ServerOracle

DataGrip automatically refreshes the schema in the database explorer every time a DDL statement is executed. This applies when the Auto sync option is turned on in the data source properties.

This process could take a significant amount of time when the database contains many objects, for example with Oracle databases, where the system catalogs are very slow.

Starting from the 2024.2 version, this refresh mechanism is more efficient than before. DataGrip now analyzes which objects could be potentially modified by the query and refreshes that specific set of objects only.

Important! Although we make every effort to ensure that DataGrip successfully detects modified objects in the majority of cases, if the statement modifies other objects indirectly, DataGrip may miss such modifications, for example when dropping objects with cascade options or modifying tables used in procedures or functions. In this situation, you can call the Refresh action to make DataGrip perform a complete database refresh.

IDE macros for connection startup scripts

It's now possible to use built-in macros in your connection startup scripts. To add a macro to the script, go to File | Data Sources, select your data source, and open the Options tab. Then navigate to Startup script and click Insert Macros.

For example, if you need the OS username of the user who initiates a connection, you can use the OSUser macro in your script: ALTER SESSION SET QUERY_TAG = '$OSUser$'.

Non-RSA certificate support

Non-RSA certificates are now supported for SSL connections.

Support for Iceberg, dynamic, and hybrid tables

Snowflake

Iceberg, dynamic, and hybrid Snowflake tables are now introspected and displayed in the database explorer.

Download