Data editor

Modify data

Modify data

Modify data in your table without leaving the window. This also works for query results received from a SELECT statement. Press Cmd+Space to bring up completion options for table values. The completion feature looks through all of the values in the column and offers you a list of possible matches. Submit changes using Cmd+Enter.

Bulk submit

Bulk submit

All of your changes in the data editor are stored locally and can be submitted all at once. Local changes are colored, so you can see which changes you are going to save, whether you’re updating, inserting, or deleting rows. Submit with Cmd+Enter. Cmd+Opt+Z cancels the selected changes. If you wish to cancel all of the changes, select all the cells with Cmd+A before reverting.

DML preview in the data editor

DML preview in the data editor

You can review the query that represents your changes in the data editor by clicking the DML button that is active if there are pending changes. You will see a dialog with the DML preview. This query is not the exact SQL that will be run to modify your data because DataGrip uses a JDBC driver to update tables, but most of the time it will be the same.

Learn more

Multiple edit

Multiple edit

Several fields can be edited at the same time – just select them and start typing. This only works if the columns you are editing are not unique and have the same type.

Paste from CSV

Paste data from any CSV source or Excel table. In DataGrip you can define any format you want, or you can let the IDE detect the format automatically. Just select Gear icon → Paste format and you’re done.

SQL log

SQL log

While updating data, you can see which specific queries DataGrip is running. We have nothing to hide!

Filter data

Filter data

Use the filter text field to see only the data you need, without writing any WHERE clauses. Just write the condition in this field using the appropriate SQL dialect.

Text search

Text search

You can find data quickly within a table without writing a statement. Press Cmd+F to bring up the text search feature. It’s especially helpful if you don’t know exactly which column contains the data you’re looking for. You can easily hide irrelevant rows, and regular expressions are also available.

Transaction control

Transaction control

Define what kind of transaction control you want to use when working with data. The data editor in Auto mode works as described in the Bulk Submit section.

In Manual mode, you also have the following actions available to you:

  • The Commit button (or ⇧⌘⌥Enter) commits the transaction. If you have unsubmitted local changes (these are highlighted), they will be automatically submitted before the commit.
  • The Rollback button rolls back a transaction if it’s uncommitted.

Transpose view

Transpose view

If the table contains too many columns to fit on the screen, use the Transpose view to get a more convenient look at the data from a specific row.

Search for a column

Search for a column

Open the Structure view by pressing Cmd+F12 and start typing! Speed search can help you by filtering the columns. Press Enter to navigate to a particular column.

Compare cells

Compare cells

The values of two or three cells can be compared in the Diff Viewer. Select them and press Shift+Cmd+D.

Export data

Export data

Any table or result set can be exported in a variety of formats including CSV, JSON, XML, and HTML. You can even create your own format to export to.

Learn more

Aggregates

Aggregates

The Aggregate view for a range of cells will help you manage your data and spare you from having to write additional queries. Select the cell range you want to display in this view, then right click and select Show Aggregate View.

Navigation by foreign keys

If a column contains a foreign key, you can navigate to the related data for a particular value or view it in the pop-up. In many situations, this saves you from having to write a query.

On the opposite side, you can find usages of foreign keys in other tables. You will be navigated to the data referencing your row and column. If the cursor is on a column that is not referenced, then you can choose what data you want to navigate to.

Separate editor for cell values

Formatted value

Formatted value

This displays the formatted value even if the value is stored as one line. You can also edit the value in the formatted view and update it with the original formatting. This works with single-line XMLs and JSONs.

Bottom position

Bottom position

If the width of the screen is crucial to your flow, you can move the cell value editor out of the way by placing it at the bottom of the data editor.

Images

Images

This panel can now also display images!

Expanding/Shrinking selection

Expanding/Shrinking selection

DataGrip has the Expand Selection action in tables (Ctrl+W). You also can use the opposite action: Shrink Selection. The shortcut is Ctrl+Shift+W.

Results in editor

Results in editor

You can see results in the code editor. To turn it on for the whole IDE, use Settings/Preferences | Database | Query Execution | Output and Results | Show results in the editor. There is also a button on the toolbar that toggles between the two modes for only the current file.

Geo viewer

Geo viewer

To get a view of 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.

Tab naming

Tab naming

The result tabs can be named. Just use the comment before the query.

Learn more