Databases with basic support
To create a data source, you need a JDBC driver. There are two types of drivers in DataGrip: with Complete Support and with Basic Support. You can see a list of database vendors with complete and basic support on the Drivers tab in the Data Sources and Drivers dialog. Also, note that user-created drivers are considered as drivers with basic support.
Complete Support includes such features as enhanced code completion and better retrieval of database objects (introspection). For example, with complete support, you will see the following objects in the corresponding databases: user-defined types in Apache Cassandra, macros in Apache Hive, extensions in PostgreSQL. Also, all inspections, quick-fixes, and other coding assistance features are available for databases with the complete support.
Basic Support provides a code highlighting, and it also displays the objects retrieved by the JDBC driver. DataGrip uses JDBC metadata for database introspection and the SQL 2016 dialect for code highlighting. No errors are detected and highlighted.
The introspection with JDBC metadata means that some specific database objects will not appear in the database tree view. Code completion will not include objects that were not retrieved during introspection.
Basic support is provided for the following database vendors:
AWS Athena
Apache Ignite
Apache Spark
DuckDB
Elasticsearch
Firebird
Google Cloud Spanner
Informix
InterSystems IRIS
Mimer SQL
OpenEdge
Phoenix
Presto
SAP HANA
SingleStore
Tarantool
Teradata
TiDB
Tibero
Trino
YugabyteDB
Creating data sources from drivers with basic support
There are two ways to create data sources from drivers with basic support.
Using the Other submenu
Using user driver files
Using the Other submenu
Open data source properties. You can open data source properties by using one of the following options:
Navigate to
.Press Ctrl+Alt+Shift+S.
In the Database Explorer ⌘ 1 ( ), click the Data Source Properties icon ().
In the Data Sources and Drivers dialog, you can use Data Sources and Drivers tabs to create a data source.
Data Sources: click the Add icon () and navigate to Other. In this submenu, select the driver that you want to use for the data source creation.
Drivers: click the Drivers tab and select the necessary driver. In the settings of this driver, click Create Data Source.
Specify the database connection details. Alternatively, paste the JDBC URL in the URL field.
To delete a password, right-click the Password field and select Set Empty.
For the reference information about connection settings (for example, Host, Port, and so on) on the General and other tabs of Data Sources and Drivers dialog (Ctrl+Alt+Shift+S) , see Data Sources.
Check if there is a Download missing driver files link at the bottom of the connection settings area. Click this link to download drivers that are required to interact with a database. For a direct download link, refer to the JetBrains JDBC drivers page.
Location for the downloaded JDBC drivers is the DataGrip configuration directory.
You can also use your drivers for the database instead of the provided ones. For more information about connecting to a database with your driver, refer to Add a user driver to an existing connection.
If there is no Download missing driver files link, then you already have the required drivers.
Ensure that the connection to the database can be established using the provided details. To do that, click the Test Connection link at the bottom of the connection details area.
In case of any connection issues, refer to the Cannot connect to a database page.
Click OK to create the data source.
Find your new data source in Database Explorer.
To write and run queries, open the default query console by clicking the data source and pressing F4.
To view and edit data, use Data editor and viewer.
For more information about working with database objects in DataGrip, refer to Database objects.
Using user driver files
Open data source properties. You can open data source properties by using one of the following options:
Navigate to
.Press Ctrl+Alt+Shift+S.
In the Database Explorer ⌘ 1 ( ), click the Data Source Properties icon ().
In the Data Sources and Drivers dialog, ensure that you are on the Drivers tab.
In the Data Sources and Drivers dialog, click the Add icon ().
In the Name field, type the name of the driver.
In the Driver Files pane, click the Add icon () and select Custom JARs.
Navigate to the JAR file of the JDBC driver, select it, and click OK.
In the Class field, specify the value that you want to use for the driver.
Click Apply.
To create a data source from the driver's dialog, click Create Data Source.
Library paths for user drivers
To work properly, some JDBC drivers require a path to library files along with the driver.
For example, to determine if the application should operate in the Instant Client mode, Oracle Instant Client (OCI) applications look for library files in the runtime library search path (LD_LIBRARY_PATH
on Linux or PATH
on Windows). You can set these paths in the Data Sources and Drivers dialog.
Adding library paths
Open data source properties. You can open data source properties by using one of the following options:
Navigate to
.Press Ctrl+Alt+Shift+S.
In the Database Explorer ⌘ 1 ( ), click the Data Source Properties icon ().
In the Data Sources and Drivers dialog, click the driver entry to which you want to add a path to library files.
(Optional) Add a driver for which you want to add library files. If the existing driver does not meet the requirements, replace the existing driver. To delete the existing driver entry, select the driver and click Remove.
For more information about adding a driver, refer to create a connection to a database with a JDBC driver.
In the Driver files pane, click the Add icon () and select Native Library Path.
Navigate to the folder with library files. Ensure that the driver version corresponds to the version of these library files. For example, if you use the driver version 19.6, the attached library files must also have the 19.6 version.
Productivity tips
Create a data source from the JDBC URL
To connect to the database, create a data source that will store your connection details. You can do this using one of the following ways:
In the main menu, go to
.In the Database Explorer ( ) , click the New icon () in the toolbar. Navigate to Data Source from URL.
In the URL field, paste the JDBC URL.
From the Driver list, select the necessary driver for the data source.
In the Data Sources and Drivers dialog, enter credentials.
Ensure that the connection to the database can be established using the provided details. To do that, click the Test Connection link at the bottom of the connection details area.
In case of any connection issues, refer to the Cannot connect to a database page.
Click OK to create the data source.
Find your new data source in Database Explorer (⌘ 1) .
For more information about Database Explorer, see the corresponding reference topic.
For more information about working with database objects in DataGrip, refer to Database objects.
To write and run queries, open the default query console by clicking the data source and pressing F4.
To view and edit data of a database object, open Data editor and viewer by double-clicking the object.