DataGrip 2024.2 Help

Release notes

This section lists functionality added to DataGrip in the current release. To view release notes for other DataGrip versions, click the version switcher on the help site and select the version that you need.

Release notes

AI Assistant features

Generate code in editor

AI Assistant can now generate SQL code in the editor. To use this feature, press Ctrl+\, or click the Generate Code with AI icon Generate Code with AI on the editor toolbar, and enter your prompt. For example, Add commands that will create a books table and populate it with three sample rows.

Entering the prompt in the editor

After the assistant generates the code, you can improve it by specifying your prompt, regenerate the code, and accept it by clicking the corresponding buttons at the bottom of the generated result. You can also take the generated code to AI chat.

Generated code in the editor

Modify tables

AI Assistant can now help you with modifying tables. To get the assistance, in the Modify dialog, click UI AI Assistant to invoke the UI AI Assistant dialog. In the dialog, ask the AI Assistant to do what you need. For example, Switch all the VARCHAR data types to CHAR.

AI Assistant generated code for modifying a table

Once the assistant generates the resulting code, you will be able to view and edit it in the preview pane of the dialog.

Explain and fix SQL problems using intention actions

Now you can use AI Assistant’s help to better understand and fix SQL problems. For any problems higher than weak warning, the assistant now suggests an explanation and a fix.

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

AI Assistant explains problems in the selected SQL code

To fix the problem, in the AI Actions popup window, select Fix SQL problem under caret.

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

AI Assistant suggests a fix for the problems of selected SQL code

Working with data

Scripted data loaders

You can now import the data from your tabular data files. We have implemented the scripted data loaders to enable the import for the following file formats: Excel, JSON, Parquet, and Shapefile.

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

To import the data, drag your file from the Files tool window to the schema in Database Explorer, and configure the import settings in the Import dialog that opens.

Import dialog for importing data from an Excel file

Data Editor and Viewer

Now you can navigate to related records by using the table cell's floating toolbar. To do that, click the cell, then click the Related Rows icon Related Rows icon on the floating toolbar that appears.

Floating toolbar for grid cells

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

You can set the action behavior using the Related Rows action behavior setting. To do that, navigate to 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 one will show the referenced rows only.

Last modified: 21 June 2024