Categories

Versions

You are viewing the RapidMiner Server documentation for version 9.4 -Check here for latest version

Creating Database Connections

This connection management is deprecated. Please use thenew connection management.

Using the RapidMiner Server web interface, you can define database connections and assign user access to them. Once configured on RapidMiner Server, connections are available in all connected RapidMiner Studio instances. On all platforms, RapidMiner uses the JDBC standard to connect to databases.

With RapidMiner Server you configure server settings and credentials centrally, allowing users to share (based on their permissions) database connections. This section describes:

Adding a new database connection

You define database connections, and provide users with access, in the RapidMiner Server web interface. To create a database connection:

  1. From the RapidMiner Server web interface, selectAdministration > Database connections.

  2. In theActionsbox, clickCreate new connection entry:

  3. TheDatabase Connectionwindow opens, showing theGeneral Settingstab:

  4. Supply the basic parameters that define the connection—typically all fields. (If your database does not require authentication, for example, leave theUserandPasswordblank.)

    Parameter Description
    Name Enter a name for the connection.
    Database system From the drop-down list, select the system the database uses. If your system isn't listed, you must firstadd the JDBC driver.
    Host Enter the hostname or IP address for the local machine hosting the database connection. See thespecial noteon using "localhost" as a host name.
    Port Enter the port number used to access the database.
    Schema Enter the name of the schema that defines the portion of the database to be used by RapidMiner processes.
    User 输入用户登录权限的名称to the database.
    Password Enter the password for the user with login privileges to the database.
  5. When you are finished making changes, clickTestto check the connection. When the test passes, clickSubmitto save the new connection:

  6. Optionally, use theAdvanced Settingstab to further refine the connection.

Special consideration of the hostname

If you want the current machine running RapidMiner Server to host the database connection, make sure to enter "localhost" for theHostparameter. If you use the IP address 127.0.0.1, "host" isnotreplaced by the host name of the server.

RapidMiner Server stores database connections with the server IP address. If you create a connection on the server using 127.0.0.1, it is stored as "localhost." When RapidMiner Studio looks the database up on "localhost," it is looking on the host that runs RapidMiner Studio, and the database is not there. By specifying "localhost" instead of "127.0.0.1" for the hostname, RapidMiner Server replaces "localhost" with the unique hostname of the machine (making RapidMiner Studio able to find it).

Adding JDBC drivers

RapidMiner Server comes with database drivers for several popular database systems. If your driver is not part of the standard package, you can add it.

Note: For any connections shared between RapidMiner Studio and RapidMiner Server, the JDBC drivers must be installed on each platform. It is easiest to complete the RapidMiner Studio installation first, as one of its modified files is required to complete the RapidMiner Server installation.

Adding drivers to RapidMiner Studio

To add JDBC drivers for databases to RapidMiner Studio:

1. If necessary, quit RapidMiner Studio.

2. Download and then copy the JDBC driver .jar file for the database system you'd like to add into thelib/jdbcsubfolder of your RapidMiner Studio installation directory.

  1. Start RapidMiner Studio. Go toConnections > Manage Database Drivers:

  2. ClickAddAdd并完成该领域s for the new database. If unsure of values, check your documentation or Google the JDBC driver type. For the .jar file, browse to the location in thelib/jdbcfolder.

  3. When you have finished completing the fields, clicksaveSave.

  4. To verify the addition, go toConnections > Show Database Drivers. The new driver should be present (alphabetically) in the list of available drivers.

  5. Restart RapidMiner Studio.

If you have multiple RapidMiner Studio instances that use the newly added driver:

  1. RepeatStep 1andStep 2for each system.

  2. Copy thejdbc_properties.xmlfile from the.RapidMinerfolder with the installed driver and paste it to the.RapidMinerfolder of each other system.

  3. Verify that the path of the .jar file is correct on the instance, and edit it if necessary.

  4. Restart RapidMiner Studio. The driver is now available inConnections > Manage Database Drivers.

Adding drivers to RapidMiner Server

To add database JDBC drivers to RapidMiner Server:

  1. Download and then copy the JDBC driver .jar file for the database system you'd like to add into the RapidMiner Server installation folder.

  2. In theprevious sectionyou installed the driver on a RapidMiner Studio instance. Locate the filejdbc_properties.xmlin the.RapidMinerfolder of that local user and copy it.

  3. Open theresources/jdbc/folder within theRapidMiner Server home directory.

  4. Paste the filejdbc_properties.xml(copied from your RapidMiner Studio instance) into the
    /resources/jdbc/folder.

  5. Open the file and edit any properties that have changed. For example, the path of the .jar file will have changed.

  6. Edit the file to match the required settings for the desired JDBC driver:

      

    For example (adding Amazon Redshift):

      

    Note that there may be multiple elements (one for each additional driver) within the outermarkers.

  7. From the web interface of RapidMiner Server, openAdministration > Database Connections. In theActionsbox, selectReload database drivers.

  8. OpenAdministration > Database Connectionsagain and selectCreate new connection entryin the actions tab. Now, the newly added driver is available in theDatabase Systemsettings.

Modifying advanced driver settings

Database connection properties are defined by the JDBC driver of your database. These driver-dependent settings are listed (and set) in theAdvanced Settingstab of theDatabase Connectionwindow. See your database and JDBC driver documentation for a description of each property. To access the settings:

  1. From the RapidMiner Server web interface, selectAdministration > Database connections.

  2. Click on the connection for which you want to modify properties. TheDatabase Connectionwindow opens.

  3. Click on theAdvanced Settingstab. The settings for the connection appear, displaying each property and value:

  4. Modify any properties. Hover over the property name for a description of that property. ClickOverwrite.

  5. When you are finished making changes, clickTestto check the connection:

    When the test passes, you are returned to theGeneral Settingstab with a message that pinging the database with the connection was successful.

  6. FromGeneral SettingsorAdvanced Settings, clickSubmitto save the changes.

Database connection access rights

Users require access to database connections when they execute processes that use that database. Youassign access rightsto the database connections from theAdministration > Database connectionswindow of the RapidMiner Server web interface.