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.
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.
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.
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 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.
While updating data, you can see which specific queries DataGrip is running. We have nothing to hide!
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.
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.
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:
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.
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.
The values of two or three cells can be compared in the Diff Viewer. Select them and press Shift+Cmd+D.
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.
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.
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.
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.
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.
This panel can now also display images!
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.
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.
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.
The result tabs can be named. Just use the comment before the query.