DataGrip 2023.1 Help

View data

When you double-click a table in the Database Explorer ( View | Tool Windows | Database Explorer), the table, view, or virtual view opens in the data editor.

Data view modes

You can browse and edit table data in three modes: Table, Tree, Text, and Transpose. To switch between these modes, click the View as button (the View as button) and select the mode that you need.

  • Transpose: viewing mode in which rows and columns are interchanged. You can combine this checkbox with other viewing modes.

    To make this mode a default for tables and views, open settings by pressing Control+Alt+S and navigate to Database | Data Views and select the Automatically transpose tables. When this option is enabled, query results are not transposed.

    The transposed table viewing mode
  • Table: the default viewing mode of table data. Data in a table is stored in a cell that is an intersection of a vertical column and horizontal row.

    The table viewing mode
  • Tree: viewing mode in which data is displayed in the key-value table with the possibility to expand the key cell if it contains children nodes. Data from the expanded children node is distributed between key and value columns. You might consider using this mode to work with JSON and array data.

    The tree viewing mode
  • Text: viewing mode in which data is displayed as a text.

    The transposed table viewing mode

Transpose a table, a view, or a virtual view

You can rotate the table data from rows to columns and from columns to rows. In the transposed view, the rows and columns are interchanged. You can combine the transpose action with other viewing modes.

  • To transpose a table, a view, or a virtual view click the View as button (the View as button) and select Transpose.

    The transposed table viewing mode

View the query that generated the result set

  • To see the query that was used to generate the result table, click the Show Options Menu icon (the Show Options Menu icon) and select View Query. If necessary, you can select the query text and copy it to the clipboard by pressing Control+C.

    To close the pane where the query is shown, press Escape.

    View the query that generated the table

Preview DML

  • When you insert, delete, or modify data in a table editor, you can preview the query that DataGrip uses to perform selected operations. To preview the query, click the Preview Pending Changes button (the Preview pending changes button) on the toolbar.

    the DML preview

Reload data for the table view

You need to reload data for the table view if you want to synchronize the data that you see in the editor with the contents of the database. Or, when you want to apply the page size limit setting after its change.

  • Click the Reload Page icon The Reload All from Disk button on the toolbar.

  • Right-click the table and select Reload Page from the context menu.

  • Press Control+F5.

Value editor

Value editor is a separate editor where you can edit data that is stored in the cell. To open Value editor, in the cell context menu select Open in Value Editor.

Open in Value Editor context menu option

To edit the value in Value editor, do the following:

  • To start a new line, press Enter.

  • To enter the value, press Control+Enter.

  • To restore an initial value and quit the editing mode, press Escape.

  • To enable soft wrap in the editor by clicking the Toggle Soft-Wrap button the Toggle Soft-Wrap button.

If you store one-line JSON in a cell, you can click the Toggle Formatting icon. This action formats one-line XML and JSON strings.

Also, you can preview images in the value editor.

Note that to leverage the performance issues, the default LOB size is limited to 1024 bytes. It means that only 1024 bytes are loaded to the table editor. To increase this size and view larger images, open settings by pressing Control+Alt+S, navigate to Database | Data Editor and Viewer, and change the value of the Maximum number of bytes loaded per value option.

Aggregate view

In the Aggregate view, you can select values of multiple cells and get a single summary value. To open Value editor, in the cell context menu select Show Aggregate View.

Open in Value Editor context menu option

Click the gear icon on the toolbar of the Aggregates tab to view, enable, and disable aggregates. Also, you can create your own aggregate scripts. Bundled scripts are located in Scratches and Consoles | Extensions | Database Tools and SQL | data | aggregators. To add your own aggregator, place your script to the aggregators directory.

Aggregate scripts and extractors

Using Geo viewer for geographical data in PostgreSQL

The Geo viewer is a graphic viewer that you can use to explore geospatial data in your database. The Geo viewer opens in the Services tool window. You can click rows to navigate to the corresponding area on the map or click a pin on the map to navigate to the corresponding row.

To detach the Geo viewer tab from the Services tool window, drag it from the Services tool window.

Currently, DataGrip supports coordinates in the following formats: WKT, WKB, and PostGIS geometry 4326.

The Geo Viewer

View geographical data with the Geo viewer

  1. In the Database Explorer ( View | Tool Windows | Database Explorer) , double-click the table with geographical data.

  2. Click the Show Options Menu icon (Show Options Menu icon) and select Show Geo Viewer.

  3. Read the notification about possible risks of enabling JCEF. If you accept the risk, click Enable JCEF.

  4. In the Restart Required window, click Restart Now.

  5. After the restart, press Control+F5 or reopen the table with geographical data.

  6. Click the Show Options Menu icon (Show Options Menu icon) and select Show Geo Viewer.

    View geographical data with the Geo viewer

Recover DataGrip after enabling JCEF

  1. Navigate to the config directory.

    Syntax

    %HOMEPATH%\.<product><version>\config\projects

    Example

    C:\Users\JohnS\.DataGrip2023.1\config\projects

    Syntax

    ~/Library/Application Support/<product><version>

    Example

    ~/Library/Application Support/DataGrip2023.1

    Syntax

    ~/.<product><version>/config/plugins

    Example

    ~/.DataGrip2023.1/config/plugins

  2. In the options directory, open ide.general.xml in a text editor.

  3. Remove the following line: <entry key="ide.browser.jcef.enabled" value="true" />

Last modified: 21 June 2023