IntelliJ IDEA 2023.1 Help

How to fetch more fields for MongoDB introspection

Enable the Database tools and SQL plugin

This functionality relies on the Database tools and SQL plugin, which is bundled and enabled in IntelliJ IDEA by default. If the relevant features aren't available, make sure that you didn't disable the plugin.

  1. Press Control+Alt+S to open the IDE settings and select Plugins.

  2. Open the Installed tab, find the Database tools and SQL plugin, and select the checkbox next to the plugin name.

You can observe collections and fields in the database explorer. IntelliJ IDEA fetches the first 10 documents from each collection to get information about the fields. You can customize this behavior by specifying the fetch_documents_for_metainfo JDBC parameter on the Advanced tab of the data source properties dialog.

  1. In the Database tool window ( View | Tool Windows | Database) , right-click MongoDB data source and select Properties.

  2. Click the Advanced tab.

  3. In the parameter table, scroll down till you see fetch_documents_for_metainfo.

  4. Double-click the Value cell of the fetch_documents_for_metainfo parameter.

  5. Specify the desired value.

Last modified: 21 June 2023