Features News Tutorials

Top 9 Spreadsheet Features of DataGrip You Have to Know

JetBrains DataGrip is a universal tool for dealing with databases. It supports PostgreSQL, MySQL, SQL Server, Oracle, MongoDB, and many other databases.



When you work with databases, you’re exploring the data contained in them. And there are times you’ll want to manipulate that data without having to write queries. DataGrip has your needs covered with its smart data editor, a mini spreadsheet right inside your IDE.

Let’s take a closer look at some of the data viewing and editing perks inside DataGrip.

1. Data search

When working with a table, enter a filter condition written in SQL in the corresponding field as if you were writing a WHERE clause. DataGrip will query the database and return the data set that matches your filter.


To quickly find data inside a table without querying the database again, call up the text search with Ctrl/Cmd+F. This is especially helpful if you don’t know which column contains the data you’re looking for.


Note that this search works only within the current page of the result set. You can enable All in the paging setting to make the text search look through the entire spreadsheet.

2. Navigation by foreign keys

All values with foreign keys are links! Use them to navigate to the related data for a particular value. In many situations this saves you from having to write a query.

In the example below we’re getting the name of a film that actor Grace Mostel starred in.


3. Copy and paste inside the editor

Like in a spreadsheet, you can copy several values and then paste them into some other part of the grid. You can even copy raw CSV content from an external source and paste it into the data editor!


4. Expand selection

If you want to select a whole column or row to copy it, use the Expand Selection action: Ctr+W for Win/Linux and Opt+Up for MacOS.

To select a column, press once.
To select a row, press twice.
To select the whole grid, press three times.


5. Powerful export

The data you select can be copied to the clipboard in any format! Select the format you want from the drop-down list and click Copy. For instance, if you choose JSON from the list, Ctrl/Cmd+C will copy the selected data to your clipboard with JSON formatting.


Naturally, the whole table or result can be exported to a file in any format as well.

Even more interestingly, you can create your own clipboard and export formats! Read this tutorial to learn how to do that.

6. View options

The available formats can be used not only for copying or exporting to a file but also for viewing data. Want to see your results in plain text format? Just choose the Pretty format and then select Text in the view options.


You can also Transpose your grid. This makes it easier to view the spreadsheet if it has many columns.


7. Column list

Another useful helper for grids with lots of columns is Column List. Call it via Ctrl/Cmd+F12. Then just type the name of the column you want to find and press Enter!


8. Export to database

A new table can be created from any data grid: a table, query result, or CSV file.

Imagine you need to JOIN two tables from two databases of different vendors. With DataGrip you can simply copy and paste one of the tables to the other database! Or perhaps you were waiting a whole hour for a query to finish, and now you want to play with the result. Create a table from it!


9. Compare data

Two data grids can be compared. DataGrip will highlight the differences and let you manage the comparison criteria via the Tolerance parameter. Click the Compare button on the data editor toolbar and choose which result set or table you want to compare it with.


That’s all for now! We hope those of you already using JetBrains DataGrip found this post useful and learned some new superpowers. If you haven’t tried DataGrip yet, now is a great time to download it and try out the cool stuff from this post. And please remember to share your feedback with us!


Tweet @ us!
— Discuss anything in the forum.
— Report bugs to our issue tracker.

Your DataGrip team

image description