---
title: Data connections
description: To enable integration with a variety of enterprise databases, DataRobot provides a “self-service” JDBC platform for database connectivity setup.

---

# DataRobot data connections {: #datarobot-data-connections }

!!! note
	If your database is protected by a network policy that only allows connections from specific IP addresses, have an administrator add all [whitelisted IPs for DataRobot](#source-ip-addresses-for-whitelisting) to your network policy. If the problem persists, contact your DataRobot representative.

To enable integration with a variety of enterprise databases, DataRobot provides a “self-service” JDBC platform for database connectivity setup. Once configured, you can read data from production databases for model building and predictions. This allows you to quickly train and retrain models on that data, and avoids the unnecessary step of exporting data from your database to a CSV file for ingest into DataRobot. It allows access to more diverse data, which results in more accurate models.

The DataRobot JDBC database connectivity solution is a standardized, platform-independent solution that does not require complicated installation and configuration. Those users with the technical abilities and permissions can establish database connections; other users can leverage those connections to solve business problems.

!!! note
    By default, only users with "Can manage JDBC database drivers" permission can add, update, or remove JDBC drivers. Only users with "Can manage connectors" permission can [add connections](#create-a-new-connection). See [Roles and permissions](roles-permissions) for details on permissions.

This section includes the following:

* An overview of the [database connectivity workflow](#database-connectivity-workflow).
* Steps for [creating new connections](#create-a-new-connection).
* Information about [data connections with OAuth](#data-connection-with-oauth).
* Steps for [adding data sources](#add-data-sources).
* Steps for [sharing data connections](#share-data-connections).

## Database connectivity workflow {: #database-connectivity-workflow }

By default, users can create, modify (depending on their [role](roles-permissions#shared-data-connection-and-data-asset-roles), and share data connections (see below for [definitions](#database-connection-terms) of the terminology used in this section). You can also create [data sources](glossary/index#data-source).

DataRobot's database connectivity workflow, described below, has two fundamental components. First, the administrator uploads JDBC drivers and configures database connections for those drivers. Then, users can import data into DataRobot for project creation and predictions, as follows:

1. From the **Data Connections** page, create [data connection](#create-a-new-connection) configuration(s).

2. From the same **Start** screen or the [**AI Catalog**](catalog#add-data-from-external-connections), create [data sources](#add-data-sources)&mdash;from the data connections&mdash;to use for modeling and predictions.

    Once configured, your data sources are available for both ingest from the **Start** screen and for predictions from the [Make Predictions](predict) tab.

3. Optionally, and depending on [role](roles-permissions#shared-data-connection-and-data-asset-roles), [share](#share-data-connections) data connections with others.

There are additional opportunities to launch the data source creation dialogs, but these instructions describe the process used in all cases.

### Source IP addresses for whitelisting {: #source-ip-addresses-for-whitelisting }

Any connection initiated from DataRobot originates from one of the following IP addresses:

{% include 'includes/whitelist-ip.md' %}

## Create a new connection {: #create-a-new-connection }

To create a new data connection:

1. From the account menu on the top right, select **Data Connections**.

	![](images/jdbc-dataconn.png)

2. Click **Add new data connection** to open the data store selection dialog box. You can also create a new data connection using the [**AI Catalog**](catalog) by selecting **Add to catalog** > **New Data Connection**.

	![](images/jdbc-dataconn-2.png)


3. Select the tile for the data store you wish to use.

	![](images/jdbc-dataconn-1.png)

    ??? note "Self-Managed AI Platform installations"
        For Self-Managed AI Platform installations, you might not see any data stores listed. In that case, click **Add a new driver** and add a driver from the [list of supported databases](#supported-databases).

        ![](images/jdbc-add-new-connector-driver-on-prem.png)

4. Complete the fields for the data store. They will vary slightly based on the data store selected.

	![](images/jdbc-dataconn-3.png)

	| Field | Description |
	|-----------------------|----------------|
	| Data connection name  | Provide a unique name for the connection. |
	| Version | Select the version of the data store to use from the dropdown list. |
	| Configuration: Parameters | Modify [parameters](#data-connection-with-parameters) for connections.  |
	| Configuration: URL | Enter the URL to the database/data store to connect to, in the form jdbc:mysql://<HOST>:<PORT>/<NAME>. You can include parameters in the URL if your connection requires them. |

5. Click **Add data connection** to save the configuration.

    The new connection appears in the left-panel list of **Data Connections**.

!!! note
    Any connection that you create is only available to you unless you [share](#share-data-connections) it with others.

#### Data connection with parameters {: #data-connection-with-parameters }

The parameters provided for modification in the data connection configuration screen are dependent on the selected driver. Available parameters are dependent on the configuration done by the administrator who added the driver.

![](images/jdbc-params-1.png)

Many other fields can be found in a searchable expanded field. If a desired field is not listed, you can click **Add parameter** to include it.

![](images/jdbc-params-2.png)

Click the trash can icon (![](images/icon-delete.png)) to remove a listed parameter from the connection configuration.

!!! note
		Additional parameters may be required to establish a connection to your database. These parameters are not always pre-defined in DataRobot, in which case, they must be manually added.

		For more information on the required parameters, see the [documentation for your database](data-sources/index).

#### Data connection with OAuth {: #data-connection-with-oauth }

Snowflake and Google BigQuery users can set up a data connection using OAuth single sign-on. Once configured, you can read data from production databases to use for model building and [predictions](batch-pred-jobs).

For information on setting up a data connection with OAuth, the required parameters, and troubleshooting steps, see the documentation for your database: [Snowflake](dc-snowflake) or [BigQuery](dc-bigquery).

### Test the connection {: #test-the-connection }

Once your data connection is created, test the connection by clicking the **Test connection** button in the upper right.

![](images/jdbc-test.png)

In the resulting dialog box, enter or [use stored](stored-creds) credentials for the database identified in the **JDBC URL** field or the parameter-based configuration of the data connection creation screen. Click **Sign in** and when the test passes successfully, click **Close** to return to the **Data Connections** page and create your [data sources](#add-data-sources).

### Modify a connection {: #modify-a-connection }

You can modify the name, JDBC URL, and, if the driver was configured with them, the parameters of an existing data source.

1. Select the data connection in the left-panel connections list.

2. In the updated main window, click in the box of the element you want to edit and enter new text.

3. Click **Save changes**.

### Delete a connection {: #delete-a-connection }

You can delete any data connection that is not being used by an existing data source. If it is being used, you must first delete the dependencies. To delete a data connection:

1. From the **Data Connections** tab, select the data connection in the left-panel connections list.

2. Click the **Delete** button in the upper right (![](images/icon-delete.png)).

3. DataRobot prompts for confirmation. Click **Delete** to remove the data connection. If there are data sources dependent on the data connection, DataRobot returns a notification.

	![](images/jdbc-conn-delete.png)

4. Once all dependent data sources are removed <a target="_blank" href="https://datarobot-public-api-client.readthedocs-hosted.com/en/v2.11.1/api/database_connectivity.html#datarobot.DataSource.update">via the API</a>, try again to delete the data connection.

## Add data sources {: #add-data-sources }

Your data sources specify, via SQL query or selected table and schema data, which data to extract from the data connection. It is the extracted data that you will use for modeling and predictions. You can point to entire database tables or use a SQL query to select specific data from the database. Any data source that you create is available only to you.

!!! note
    Once data sources are created, they cannot be modified and can only be deleted <a target="_blank" href="https://datarobot-public-api-client.readthedocs-hosted.com/en/v2.25.0/entities/database_connectivity.html">via the API</a>.


To add a data source, do one of the following:

* From the **Start** screen, click **Data Source** and select the connection that holds the data you would like to add. See how to [import from an existing data source](import-to-dr#use-an-existing-data-source).

* From the [**AI Catalog**](catalog), select **Add to catalog** > **Existing Data Connection**. See how to [add data from external connections](catalog#add-data-from-external-connections).

## Share data connections {: #share-data-connections }

Because the user creating a data connection and the enduser may not be the same, or there may be multiple endusers for the data connection, DataRobot provides the ability to set user-level permissions for each entity. You can accomplish scenarios like the following:

* A user wants to set permissions on a selected data entity to control who has consumer-level, editor-level, or owner-level access. Or, the user wants to remove a particular user's access.
* A user that has had a data connection shared with them wants the shared entity to appear under their list of available entities.

When you invite a user, user group, or organization to share a data connection, DataRobot assigns the default role of Editor to each selected target (not all entities allow sharing beyond a specific user). You can change the role from the dropdown menu.

To share data connections:

1. From the account menu on the top right, select **Data Connections**, select a data connection, and click **Share**:

	![](images/jdbc-share.png)

2. Enter the email address, group name, or organization you are adding and select a [role](roles-permissions). Check the box to grant sharing permission.

3. Click **Share** to add the user, user group, or organization.

4. Add any number of collaborators and when finished, click **Close** to dismiss the sharing dialog box.

Depending on your own permissions, you can remove any user or change access as described in the table of [roles and permissions](roles-permissions).

!!! note
    There must be at least one Owner for each entity; you cannot remove yourself or remove your sharing ability if you are the only collaborating Owner.