Datalore 2024.2 Help

Configure a database connection

Procedure overview

Configure the parameters of a new database connection using the interface provided for the selected database type. Read the procedures below to do the following:

  • Configure connection parameters based on the selected database type

  • (Optional) Configure SSH tunneling

  • (Optional) Configure database introspection scope

  • (Optional) Configure JDBC driver optional parameters

Procedures

Open the New database connection dialog

The procedure depends on whether you want to add a new database connection to workspace resources or attach it to a notebook.

  1. On the Home page, select the workspace to which you want to add a database connection.

  2. From the left-hand menu of the selected workspace, select Data and switch to the Databases tab. This will open the list of all workspace database connections.

  3. On the Databases tab, click the Add button in the upper right corner.

    Databases menu
  1. Go to Main menu | Tools | Attached data or click the Attached data icon on the left-hand sidebar.

  2. Click New connection and select New database connection.

    Creating connection from notebook

    Configure a connection using database-specific interface

    This procedure describes the general workflow for all supported database types. For specific procedures, refer to the topics under this article.

    1. In the New database connection dialog, select a database type. You will be forwarded to the General tab of the New [database_type_name] connection dialog.

    2. On the General tab, fill in the fields to provide details required for the selected database type.

    3. (Optional) To configure SSH tunneling for your new connection, perform this procedure.

    4. (Optional) To configure the database introspection scope, perform this procedure.

    5. Click the Test connection button at the bottom of the dialog.

    6. Once successfully tested, click the Save and close button.

    Enable SSH tunneling

    Datalore can create an SSH tunnel based on the parameters you configure in the New [database_type] connection dialog. This procedure is an optional step of configuring a database connection in the New database connection dialog.

    1. Switch to the SSH tab of the New [database_type] connection dialog.

    2. Select the SSH checkbox.

    3. Provide your connection details in the Host, Port, and User fields.

    4. Use one of the two authentication types:

      • To use password-based authentication, fill in the Password field.

      • To use a key pair:

        1. Expand the Authentication type list and select Key pair.

        2. Under Key pair, expand the list and select one of the key pairs saved in your account settings.

      Enabling SSH tunneling

    Configure database introspection scope

    This procedure is an optional step of configuring a database connection in the New database connection dialog.

    1. Switch to the Schemas tab of the New [database_type] connection dialog.

    2. Select or deselect schemas for introspection.

      Configuring database schemas

    Manage additional parameters for your connection

    Use the Advanced tab of the database connection dialog to manage additional parameters. For example, you can manage your JDBC driver custom options here or specify your VM options.

    1. Switch to the Advanced tab of the dialog.

    2. Do one of the following:

      • To specify VM options

        Enter the values in the VM options field.

      • To add a parameter

        Click Add key-value pair. Repeat the previous step for each parameter required for your connection.

      Advanced tab of database connection dialog
    3. Click Save and close to finish your work in the dialog or switch to another tab to continue creating the connection.

    4. For VM options, use the VM options field.

    Results and further actions

    • If created for a specific notebook, the new connection will be automatically added to the workspace. You can later attach this database to any other notebook from this workspace.

    • If created for a workspace, this connection is added to the workspace databases and can be attached to any notebook from this workspace.

    • If OAuth authentication was used for this connection, report users and notebook collaborators may be required to provide their credentials to access the database.

    • To retrieve and process data from the connected database, use SQL cells.

    Keywords

    database, database connection, attach data, data sources, configure connection

    Last modified: 27 May 2024