View data
Available only in PyCharm Professional: download to try or compare editions
When you double-click a table in the Database tool window ( View | Tool Windows | Database), the table, view, or virtual view opens in the data editor.
You can browse and edit data in three modes: Table, Tree, Text, and Transpose. To switch between these modes, click 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 CtrlAlt0S and navigate to Tools | Database | Data Editor and Viewer. From the Automatically transpose tables list, select Always. When this option is enabled, query results are not transposed.
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.
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.
Text: viewing mode in which data is displayed as a text.
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 (
) and select Transpose.
To see the query that was used to generate the result table, click the Show Options Menu button (
) and select View Query. If necessary, you can select the query text and copy it to the clipboard by pressing Ctrl0C.
To close the pane where the query is shown, press Esc.
When you insert, delete, or modify data in a table editor, you can preview the query that PyCharm uses to perform selected operations. To preview the query, click the Preview Pending Changes button (
) on the toolbar.
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 button (
) on the toolbar.
Right-click the table and select Reload Page from the context menu.
Press CtrlF5.
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 Open in Value Editor context menu option](https://resources.jetbrains.com/help/img/idea/2023.2/db_show_value_editor.png)
To edit the value in value editor, do the following:
To start a new line, press Enter.
To enter the value, press CtrlEnter.
To restore an initial value and quit the editing mode, press Esc.
To enable soft wrap in the editor by clicking 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.
You can preview images in the value editor. To do that, right-click the cell that contains an image and select View Image in the context menu.
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 CtrlAlt0S, navigate to Tools | | Data Editor and Viewer, and change the value of the Maximum number of bytes loaded per value option.
![Preview images in the value editor Preview images in the value editor](https://resources.jetbrains.com/help/img/idea/2023.2/db_preview_images_in_the_value_editor.png)
In the Aggregate view, you can select values of multiple cells and get a single summary value. To open Aggregate view, in the cell context menu select Show Aggregate View.
![Open in Value Editor context menu option Open in Value Editor context menu option](https://resources.jetbrains.com/help/img/idea/2023.2/db_show_aggregate_view.png)
Click the gear icon () on the toolbar of the Aggregates tab to view, enable, and disable aggregates. To access the bundled scripts, select Go to Scripts Directory. Bundled scripts are located in Scratches and Consoles
Also, you can create your own aggregate scripts. To add your own aggregator, place your script to the aggregators directory.
![Aggregate scripts and extractors Aggregate scripts and extractors](https://resources.jetbrains.com/help/img/idea/2023.2/db_aggregate_scripts_and_extractors.png)
tip
Aggregate scripts and extractors are interchangeable. If you have previously used an extractor that gets just one value, you can copy it to the aggregates directory and use it for aggregates.
warning
The Geo data viewer works only if JCEF is enabled. In rare cases, when you enable JCEF, PyCharm might crash. It can happen if you have installed plugins that use JavaFX. If the crash happened, refer to Recover PyCharm after enabling JCEF.
note
To work with geographical data, you must install the Postgis extension on your PostgreSQL server. For more information about the installation process, refer to the Postgis documentation.
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, PyCharm supports coordinates in the following formats: WKT, WKB, and PostGIS geometry 4326.
In the Database tool window ( View | Tool Windows | Database) , double-click the table with geographical data.
Click the Show Options Menu icon (
) and select Show Geo Viewer.
Read the notification about possible risks of enabling JCEF. If you accept the risk, click Enable JCEF.
In the Restart Required window, click Restart Now.
After the restart, press CtrlF5 or reopen the table with geographical data.
Click the Show Options Menu icon (
) and select Show Geo Viewer.
Gif
Navigate to the config directory.
WindowsmacOSLinuxIn the options directory, open ide.general.xml in a text editor.
Remove the following line:
<entry key="ide.browser.jcef.enabled" value="true" />
Thanks for your feedback!