Connect to Compute

This section covers connecting compute in your AI Data Platform to other business intelligence tools.

Connections

You can connect your AI Data Platform with Oracle Analytics Cloud or other business intelligence tools.

You can connect to Oracle AI Data Platform from different business intelligence tools using a custom JDBC or ODBC provided by the AI Data Platform. Oracle AI Data Platform also supports connections from third party commercial BI tools (Tableau, Power BI) or open source BI tools like DBeaver. In order to connect from these tools, you need the connection details of the compute cluster in your AI Data Platform, which you can find in the Connection details tab. The required information varies depending on the product you are connecting from.


Connection details tab for the Dev_cluster_1 compute cluster

Connect to Oracle Analytics Cloud

You can connect to the catalog or tables managed by your AI Data Platform instance from an Oracle Analytics Cloud instance.

In order to create a connection from Oracle Analytics Cloud to Oracle AI Data Platform, you need to do the following:

  1. Get an API Key from OCI.
  2. Get an Oracle Analytics Cloud Connection Configuration File.
  3. Combine the API key and configuration file to create the connection. See Create an Oracle Analytics Cloud Connection File.
  4. Use the connection in Oracle Analytics Cloud. See Connect Oracle AI Data Platform to Oracle Analytics Cloud.

You can perform step 1 and 2 in any order, but they must both be performed before continuing.

Oracle recommends creating a user in OCI that is dedicated to the Oracle Analytics Cloud use-case. That user needs to have appropriate permissions to the tables in your AI Data Platform that you want to access from Oracle Analytics Cloud. Generate the needed API key in OCI and download the PEM file for the user created for this purpose.

Note:

  • To connect to your AI Data Platform from Oracle Analytics Cloud, you must provide the catalog name during connection setup.
  • The catalog is currently necessary for the system to locate the correct schema and data objects within the AI Data Platform cluster.
  • This requirement will be alleviated in a future release.

Get an API Key from OCI

You need an API key from OCI for a user that has access to your AI Data Platform when creating a connecting to Oracle Analytics Cloud.

The user you create the API key for must be the creator of the AI Data Platform instance or have Admin permissions for the instance. You must also have a valid AI Data Platform cluster in the instance.
  1. In OCI, click the user icon, then click My Profile.

    OCI home page with user open an My Profile highlighted

  2. Under Resources, click API keys, then click Add API key.

    OCI user profile open with username, API Keys, and Add API Keys highlighted

  3. Select Generate API key pair, then click Download private key.

    Add API key page open with Generate API key pair selected and Download private key highlighted

Save the private key (.pem file) you receive to a secure and persistent location. It is required for connections and can only be downloaded once. This file is used as your fingerprint when connecting Oracle Analytics Cloud to your AI Data Platform.

Get an Oracle Analytics Cloud Connection Configuration File

You need to download a config.json file from your AI Data Platform instance to connect it to Oracle Analytics Cloud.

You need a compute cluster with at least 2 OCPUs, 32 GB of memory for both driver and worker nodes, and at least 2 workers.
  1. Navigate to your workspace and click Compute.

    Compute page open with Cluster_High compute cluster highlighted

  2. Click the cluster you want to connect to Oracle Analytics Cloud.
  3. In the Connection details tab, click the Download icon underneath the Oracle Analytics Cloud logo. A config.json file is downloaded to your machine.

    Compute page for Cluster_High cluster open with Connection details tab and Oracle Analytics Cloud download highlighted

The config.json file you've downloaded is missing the fingerprint key value pair. It must be combined with the fingerprint key value from an API key belonging to an OCI user that created the AI Data Platform or a user with Admin permissions.
config.json file contents, including username, tenancy, region, and dsn

Create an Oracle Analytics Cloud Connection File

You need to manually add the fingerprint key value pair to the config.json file downloaded from your AI Data Platform so the file can be used to connect to Oracle Analytics Cloud.

You need to have created an API key for an OCI user that created the AI Data Platform instance or has Admin permissions for the instance. You also need to have downloaded the config.json from the cluster you want to connect to Oracle Analytics Cloud.
  1. Open the config.json file and the API key's configuration file.
  2. Edit the config.json to add the fingerprint value from the API key configuration file.

    API Key with user, fingerprint, tenancy, and region highlighted and Copy highlighted

  3. Save your changes to the config.json file.

    config.json file open with the fingerprint key pair included

In a future release, the config.json will include the fingerprint of the API key's public key and you will no longer have to manually add it. In that release, the latest API key available to the user will be used in the config.json.

Connect Oracle AI Data Platform to Oracle Analytics Cloud

You can connect to the catalog or tables managed by your AI Data Platform instance from an Oracle Analytics Cloud instance.

Oracle Analytics Cloud connections to AI Data Platform instances only support one catalog per connection. You need to create additional connections to use more than one catalog.
  1. On the Oracle Analytics Cloud home page, click Create then click Connection.

    Oracle Analytics Cloud home page with Create and Connection highlighted

  2. Click Oracle AI Data Platform.

    Create Connection dialog open with Oracle AI Data Platform highlighted

  3. Enter a name and description for your connection.

    Create connection for Oracle AI Data Platform open with Connection details, Catalog, and Private API Key highlighted

  4. For Connection Details, click Select, navigate to your config.json file, and click Open. For more information, see Create an Oracle Analytics Cloud Connection File.
  5. Select API Key as the authentication type.
  6. Enter the Catalog name to be used in your datasets.
  7. For Private API Key, click Select, navigate to your private API key (.PEM file), and click Open. For more information, see Get an API Key from OCI.
  8. Click Save.
  9. Test your new connection by creating a new dataset. For more information, see Create a Dataset from a Connection.

If you have followed the instructions and are still having issues saving your connection or listing your schemas, a cluster restart may be required.

Download JDBC Driver

You can download the JDBC driver from the Connection details tab and configure it for different BI tools.

  1. Navigate to your workspace and click Compute.
  2. Click the cluster you want to connect to a JDBC compatible BI tool and click Connections.
  3. Click Download JDBC Driver.

Configure DBeaver

You need to install DBeaver and prepare files downloaded from Oracle AI Data Platform before you can connect it to a compute cluster in your AI Data Platform.

  1. Download and install the DBeaver client. You can use either Community or Enterprise versions, but they must be at least 22.x.DBeaver is only available for Windows, Mac OS X, Eclipse Plugin, and Linux.
  2. Unzip the file from Download JDBC Driver.
  3. From the unzipped files, unzip the simbaSpark.zip driver file.

Configure DBeaver with the Spark Simba JDBC Driver

You can configure DBeaver to connect to a compute cluster in your AI Data Platform.

You must have installed DBeaver and extracted the simbaSpark.zip files downloaded from Oracle AI Data Platform.
  1. Open DBeaver.
  2. Click Database Navigator.
  3. Click Driver Manager.
  4. Click New.
  5. Enter AI Data Platform as the Driver Name.
  6. Click Libraries.
  7. Click Add Folder.
  8. Browse to the location of the sparkSimba.zip extract.
  9. Click Find Class.
  10. Select OK.
  11. Set Driver class to com.simba.spark.jdbc.Driver.
  12. Click Settings.
  13. Set Class Name to com.simba.spark.jdbc.Driver.
  14. Click OK.

Create a Database Connection in DBeaver

To connect DBeaver to a compute cluster in your AI Data Platform, you need to first create a database connection in DBeaver.

You must have configured DBeaver with the Spark Simba JDBC driver downloaded from Oracle AI Data Platform. For more information, see Configure DBeaver with the Spark Simba JDBC Driver.
  1. Open DBeaver.
  2. Click Database.
  3. Click New Database Connection.
  4. Click All.
  5. Select AI Data Platform.
  6. Click Next.
  7. Enter the URL of the JDBC driver. You can find the JDBC URL on the Connection details tab of your compute cluster in Oracle AI Data Platform.
  8. Click Finish.

Connect DBeaver to Oracle AI Data Platform using JDBC

Once DBeaver is configured and has a database connection to your AI Data Platform, you can complete the connection between DBeaver and Oracle AI Data Platform.

  1. Open DBeaver.
  2. Click Connect.
  3. Choose to connect with an authorization token or an API key.
    • Connect using authorization token
      • Use a token by not specifying any profile in the URL if you don't have a DEFAULT profile. For example: jdbc:spark://gateway.aidp.me-riyadh-1.oci.oraclecloud.com/default;SparkServerType=AIDP;httpPath=cliservice/cf18b4ef-b83e-41dd-82b6-8d391584f6c5

        The URL opens a browser window.

        Sign in to the tenancy where the AI Data Platform is created.

        For more information, see Token-based Authentication for the CLI.

    • Connect using an API key, by specifying the OCI Profile with ociProfile=<profile_name> in the connection URL.

      • Use API key authentication to connect to an AI Data Platform.

        Use API key by specifying the OCI Profile with ociProfile=<profile_name> in the connection URL. For example, to use OCI Profile name Demo: jdbc:spark://gateway.aidp.me-riyadh-1.oci.oraclecloud.com/default;SparkServerType=AIDP;httpPath=cliservice/cf18b4ef-b83e-41dd-82b6-8d391584f6c5 ;ociProfile=Demo

        For more information, see Required Keys and OCIDs.

  4. DBeaver creates a connection for reading metadata, and a connection for all the other operations. If you're limited for connections, you can disable the second one so that DBeaver uses one connection for all operations.
    1. Click Preferences.
    2. Click Common.
    3. Click Metadata.
    4. Deselect Open separate connection for metadata reads.

Download ODBC Driver

You can download the ODBC driver from the Connection details tab and configure it for different BI tools.

  1. Navigate to your workspace and click Compute.
  2. Click the cluster you want to connect to an ODBC compatible BI tool and click Connections.
  3. Click Download ODBC Driver.
  4. Select the appropriate OS from the list.

    ODBC Driver OS dropdown open with Mac, Windows, and Linx options displayed