Skip to main content

Connect to Abacus.AI Using JDBC/ODBC

The Abacus.AI platform provides an JDBC/ODBC connector as one of the options for you to attach datasets to your project from your own databases.

Connector Setup​

In order to connect to your database, the following information regarding the database is required:

  • Driver: The specific driver required to connect to the database depending upon the type of database.
  • Authentication Mechanism: Based on the authentication method associated with the database, authentication information might be required for configuration. It can be a personal access token, username and password, or no authentication at all. In this example, we'll be using a personal access token.
  • Database Server URL/IP: The server hostname's IP address or URL.
  • Database Name: The name of the specific database.
  • Database Port: The port at which the database server is running.
  • HTTP Path: The HTTP path to the specific cluster the database belongs to.
  • Authentication Methods: The method by which the server requires user authentication. We support the following methods based on the specific driver:
    1. Username and Password
      • Database Username: The username assigned to access the database. If a personal access token or no authentication is being used, then this can be disregarded.
      • Database Password: The password used to access the database. If no authentication method is being used, then this can be disregarded. If a personal access token is being used, then that will act as the password for configuration.
    2. Personal Access Token
      • The personal access token to be used in database authentication if required by the selected authentication mechanism.
    3. Client ID and Secret (Microsoft Service Principal) (for MS SQL ODBC Driver 17 and 18)
      • Client ID: The client ID of the service principal, if required to connect to the Azure SQL database.
      • Client Secret: The client secret of the service principal.

Steps to connect to Azure Databricks (JDBC)​

  1. Here's how to configure a connection to data hosted on the Azure Databricks platform. The first step is to set up authentication for the database. For this, navigate to "User Settings" and follow instructions to generate a personal access token within the Databricks platform:
Databricks User Settings for Personal Access Token
Generate Personal Access Token in Databricks
  1. Navigate to the "Compute" tab in order to extract the required information from the respective cluster. Click on "Advanced options" and "JDBC" to get the information.
    Note: Your Database Server URL/IP should not include 'https://'. Only the server hostname or address.
Databricks Compute Tab Advanced Options
Databricks JDBC Connection Details
  1. Go to the Abacus.AI Connected Services Dashboard. Click on the "Add New Connector" button at the top right corner of the page.
Abacus.AI Add New Connector Button
  1. To set up a new JDBC connector, click on the ODBC/JDBC option.
Select ODBC/JDBC Connector Option
  1. Fill out all the configuration information described above in this document and hit save, making sure to select the Databricks JDBC driver.
Fill Databricks JDBC Connector Configuration
  1. Click on the "Verify" button and wait for the connector to get verified. If there are any errors or exceptions, follow the message to troubleshoot your configuration.
Verify Databricks JDBC Connector
  1. Rename, edit configuration, or delete your connector(s) as you see fit from the Abacus.AI Connected Services Dashboard by clicking on the respective buttons.

Steps to connect to AWS Redshift (ODBC)​

  1. Navigate to the "Clusters" tab in order to extract the required information from the respective cluster. Click on "Properties" to get the information.
AWS Redshift Clusters Tab
AWS Redshift Cluster Properties
  1. Go to the Abacus.AI Connected Services Dashboard. Click on the "Add New Connector" button at the top right corner of the page.
Abacus.AI Add New Connector Button
  1. To set up a new ODBC connector, click on the ODBC/JDBC option.
Select ODBC/JDBC Connector Option
  1. Fill out all the configuration information described above in this document and hit save, making sure to select the Redshift ODBC driver.
Fill Redshift ODBC Connector Configuration
  1. Click on the "Verify" button and wait for the connector to get verified. If there are any errors or exceptions, follow the message to troubleshoot your configuration.
Verify Redshift ODBC Connector
  1. Rename, edit configuration, or delete your connector(s) as you see fit from the Abacus.AI Connected Services Dashboard by clicking on the respective buttons.

Whitelist an IP Address for an Amazon Redshift Cluster​

To whitelist an IP address for your Amazon Redshift cluster, you need to modify the associated security group to allow inbound traffic from that IP address. Follow these steps:

  1. Log in to the AWS Management Console and navigate to the Amazon Redshift dashboard.
  2. Find your cluster by looking for the cluster identifier.
  3. Identify the VPC security groups associated with your cluster. You can find this information in the details pane of your selected cluster.
  4. Navigate to the VPC Dashboard by either searching for "VPC" in the AWS Management Console or by going to the "Security" section in the Redshift dashboard and clicking on the link to the security group.
  5. Select Security Groups from the navigation pane on the left side of the VPC Dashboard.
  6. Find and select the security group that your Redshift cluster is using.
  7. Go to the Inbound Rules tab for the security group.
  8. Edit the inbound rules by clicking on the "Edit inbound rules" button.
  9. Add a new rule with the following settings:
    • Type: Redshift (or Custom TCP if Redshift is not an option)
    • Protocol: TCP
    • Port Range: The port your Redshift cluster is listening on (default is 5439)
    • Source: Enter the IP address you want to whitelist, followed by /32 to indicate a single IP address
  10. Save the rule by clicking on the "Save rules" button.

Steps to connect to Oracle (JDBC)​

Oracle has a different approach to database organization compared to some other databases like MySQL or SQL Server. In Oracle, what is often referred to as a "database" in other systems is more akin to a "schema" in Oracle. To connect to an Oracle database schema using the Abacus.AI platform, you should use the schema name as the "database name" in the connection configuration. Here's how to do it:

  1. Obtain the schema name that you have access to and wish to connect to.
  2. When filling out the configuration information for the Oracle database connection on the Abacus.AI platform, use the schema name as the "Database Name".
  3. Ensure that all other required information, such as the database server URL/IP, port, and authentication details, are correctly provided and that the Abacus.AI IP address is whitelisted.

Steps to connect to MS SQL (JDBC/ODBC)​

  1. Navigate to your SQL database page in Microsoft Azure:
Microsoft Azure SQL Database Page
  1. Click on "Connection strings", then select ODBC and note the server name after tcp:<name>.database.windows.net:
Microsoft Azure SQL Connection Strings ODBC
  1. Whitelist the Abacus.AI IPs. Please reach out to Abacus.AI support for the most up-to-date addresses:
Whitelist Abacus.AI IPs in Azure SQL
  1. While filling the JDBC/ODBC connection:
    1. Choose ODBC Driver 18.
    2. Fill in the server name ending with <server_name>.database.windows.net.
    3. Enter the database name.
    4. Use port 1433.
    5. Select 'Username and Password' as the Authentication Mechanism/
    6. Enter a username with access to the database.
    7. Enter the password for the username.
    8. Click Save
MS SQL JDBC/ODBC Connection Configuration
  1. For ODBC Driver 17 and ODBC Driver 18, you can also use the Client ID and Secret of the Microsoft Service Principal as an authentication method:
    • Client ID: The client ID of the service principal, if required to connect to the Azure SQL database.
    • Client Secret: The client secret of the service principal.
Signing in with Entra ID requires tenant consent first

If you turn on IMPORT RBAC so that each user connects with their own Microsoft Entra ID credentials (see the Azure SQL user connector guide), a Microsoft Entra admin must authorize the connector for the tenant before other users can sign in. The admin creates the connector once and ticks the "Consent on behalf of your organization" checkbox on Microsoft's Permissions requested screen — this is not the same as the Grant admin consent button in the Entra admin center. See Microsoft Entra Tenant Consent.

The username/password and service principal methods above are unaffected.

Steps to connect to Azure SQL Database (ODBC)​

Connect to an Azure SQL Database with the ODBC Driver 18 option of the JDBC/ODBC connector, using SQL authentication (a database username and password). Turn on Import RBAC to have each user query the database as their own Microsoft Entra identity, so that their own database permissions, roles and row-level security apply.

Prerequisites​

  • An Azure SQL Database, with SQL authentication enabled on its logical server.
  • A SQL login (username and password) that can read the tables you want to use, for example the server admin login.
  • Permission to change the logical server's Networking settings.
  • If you turn on Import RBAC: a Microsoft Entra admin set on the logical server (Settings → Microsoft Entra ID), to run the CREATE USER statement in step 3.

Reference: Azure SQL Database firewall rules and Configure Microsoft Entra authentication for Azure SQL

  1. Get the connection details. In the Azure portal, open your SQL database and go to Settings → Connection strings → ODBC. In the SQL authentication connection string:
    • The value after Server=tcp: and before ,1433, for example <server-name>.database.windows.net, is the Database Server URL/IP.
    • The value after Database= is the Database Name.
    • The value after Uid= is the Database Username.
Azure SQL database Connection strings page with the ODBC tab selected
  1. Allow the Abacus.AI IP addresses. Open the logical server (click the server name in the breadcrumb or on the database's Overview page) and go to Security → Networking → Public access:
    1. Set Public network access to Selected networks.
    2. Under Firewall rules, click Add a firewall rule. Enter a rule name, and enter an Abacus.AI egress IP as both the Start IPv4 address and the End IPv4 address. Add one rule for each IP address; for a CIDR range, enter its first and last address.
    3. Click Save.
Azure SQL server Networking page with public network access set to Selected networks and a firewall rule for the Abacus.AI egress IP
  1. Create the Abacus.AI user (Import RBAC only). Connect to the database as the Microsoft Entra admin, for example with Query editor on the database page in the Azure portal, and run:
CREATE USER [abacus_azure_sql] FROM EXTERNAL PROVIDER;
tip

If the statement fails because abacus_azure_sql cannot be found, the Abacus.AI application has not been added to your tenant yet. It is added the first time a Microsoft Entra admin consents to it (see the note at the end of this section).

  1. Create the connector in Abacus.AI. Click your profile picture, select Manage Connectors, click Add New Connector and choose ODBC/JDBC. Fill in the form with these values:
    1. Driver: ODBC Driver 18 (ODBC Driver 18 for SQL Server).
    2. (Optional) Import RBAC: Yes if each user should query the database as their own Microsoft Entra identity, so that their own database permissions, roles and row-level security apply. Each user then needs their own access to the database. Leave it No to have everyone query as the SQL login.
    3. Tenant ID (shown when Import RBAC is on): your Microsoft Entra Tenant ID, shown on the Microsoft Entra ID → Overview page in the Azure portal.
    4. Database Server URL/IP: the server name from step 1 (<server-name>.database.windows.net), without the tcp: prefix and the port.
    5. Database Name: the database name from step 1.
    6. Database Port: 1433.
    7. Authentication Mechanism: Username and Password.
    8. Database Username: the username from step 1.
    9. Database Password: the password of that login.
    10. Trust Server Certificate: No.
    11. Use standard port format: Yes.
    12. Click Create to save the connector.
Abacus.AI ODBC/JDBC connector form filled in for an Azure SQL Database
  1. Click Verify Now and wait for the connector to become active. If verification fails, follow the error message to troubleshoot your configuration: check that the username and password are correct and that the Abacus.AI IP addresses are allowed in the firewall rules.
Signing in with Entra ID requires tenant consent first

If you turn on IMPORT RBAC so that each user connects with their own Microsoft Entra ID credentials (see the Azure SQL user connector guide), a Microsoft Entra admin must authorize the connector for the tenant before other users can sign in. The admin creates the connector once and ticks the "Consent on behalf of your organization" checkbox on Microsoft's Permissions requested screen — this is not the same as the Grant admin consent button in the Entra admin center. See Microsoft Entra Tenant Consent.

Connecting with the username and password alone (Import RBAC off) is unaffected.

Steps to connect to Microsoft Fabric Warehouse (ODBC)​

A Microsoft Fabric Warehouse, and the SQL analytics endpoint of a Fabric Lakehouse, expose a SQL Server compatible endpoint. Connect to it with the ODBC Driver 18 option of the JDBC/ODBC connector, authenticating as a Microsoft Entra service principal (an Azure app registration).

Prerequisites​

  • A Microsoft Fabric workspace with a Warehouse or Lakehouse created in it.
  • The workspace must run on a paid Fabric capacity or a Fabric Trial.
  • The Admin or Member role on the Fabric workspace, so that you can add people to it.
  • Permission to create an app registration in the Azure portal.
  • A Fabric administrator must have the Service principals can use Fabric APIs tenant setting enabled (Admin portal → Tenant settings → Developer settings).

Reference: Connect to Fabric Data Warehouse and Service principals in Fabric Data Warehouse

  1. Get the SQL connection string. Open your Fabric workspace and open the Warehouse (or the Lakehouse SQL analytics endpoint) you want to connect to. Click Settings, select SQL endpoint and copy the SQL connection string with the copy button next to it. You can also click More options (...) next to the item in the workspace list and choose Copy SQL connection string. The value looks like <unique-id>.datawarehouse.fabric.microsoft.com; this is the Database Server URL/IP. The Warehouse (or Lakehouse) name, for example Abacus, is the Database Name.
Fabric Warehouse Settings, SQL endpoint page showing the SQL connection string
  1. Create an Azure App Registration. Go to portal.azure.com → Microsoft Entra ID → App registrations → New registration. Enter a name (for example Test fabric odbc), keep Accounts in this organizational directory only and click Register. On the app's Overview page, copy the Application (client) ID and the Directory (tenant) ID.

  2. Generate a Client Secret. In the same app registration, open Certificates & secrets → Client secrets → New client secret, enter a description, choose an expiry and click Add. Copy the secret's Value immediately: Azure shows it only once. Do not copy the Secret ID.

  3. Grant workspace access. In Fabric, open the workspace, click Manage access → Add people or groups and add both of the following with the Contributor role:

    • The app registration you created in step 2 (search for it by name).
    • abacus_azure_sql, the Abacus.AI Microsoft Entra application.
Fabric workspace Manage access panel with the app registration and abacus_azure_sql added as Contributors
tip

If abacus_azure_sql does not show up in the search, the Abacus.AI application has not been added to your tenant yet. It is added the first time a Microsoft Entra admin consents to it (see the note at the end of this section).

  1. Create the connector in Abacus.AI. Click your profile picture, select Manage Connectors, click Add New Connector and choose ODBC/JDBC. Fill in the form with these values:
    1. Driver: ODBC Driver 18 (ODBC Driver 18 for SQL Server).
    2. (Optional) Import RBAC: Yes if each user should query the Warehouse as their own Microsoft Entra identity, so that their own Fabric permissions apply. Each user then needs their own access to the Warehouse. Leave it No to have everyone query as the service principal.
    3. Tenant ID (shown when Import RBAC is on): the Directory (tenant) ID from step 2.
    4. Database Server URL/IP: the SQL connection string from step 1.
    5. Database Name: the Warehouse (or Lakehouse) name.
    6. Database Port: 1433.
    7. Authentication Mechanism: Client ID and secret of the Microsoft Service Principal.
    8. Client ID: the Application (client) ID from step 2.
    9. Client Secret: the secret Value from step 3.
    10. Trust Server Certificate: Yes.
    11. Use standard port format: Yes.
    12. Click Create to save the connector.
Abacus.AI ODBC/JDBC connector form filled in for a Microsoft Fabric Warehouse
  1. Click Verify Now and wait for the connector to become active. If verification fails, follow the error message to troubleshoot your configuration: check that the client secret has not expired, that you copied its Value, and that the app registration has access to the workspace.
Signing in with Entra ID requires tenant consent first

If you turn on IMPORT RBAC so that each user connects with their own Microsoft Entra ID credentials (see the Microsoft Fabric user connector guide), a Microsoft Entra admin must authorize the connector for the tenant before other users can sign in. The admin creates the connector once and ticks the "Consent on behalf of your organization" checkbox on Microsoft's Permissions requested screen — this is not the same as the Grant admin consent button in the Entra admin center. See Microsoft Entra Tenant Consent.

Connecting with the service principal alone (Import RBAC off) is unaffected.

Steps to connect to SAP HANA (JDBC/ODBC)​

This guide outlines the steps required to gather the necessary connection details from your SAP HANA Cloud instance to establish a JDBC connection.

Prerequisites​

  • You must have an SAP HANA Cloud instance and an associated database created.

Reference: SAP HANA Cloud Administration Guide

To configure SAP HANA connection gather the below details from your instance:

  1. Navigate to your SAP HANA Cloud instance and select the specific instance you wish to connect to.
SAP HANA Cloud Instance Selection
  1. Go to the Connections section and copy the SQL Endpoint value. This URL is crucial for configuring the Database Server URL in your connection setup.
SAP HANA SQL Endpoint
  1. The database name is also required. If you are unsure which database to connect to, you can use the query shown in the image below to retrieve the database name.
Query to Retrieve SAP HANA Database Name
  1. When filling out the connection details in your Abacus.AI SAP HANA setup, follow these steps:
    1. Choose the SAP HANA JDBC Driver.
    2. Database Server URL: Enter the SQL Endpoint value obtained in Step 2, ensuring that you remove the port number from the end of the URL before entering it.
    3. Database Name: Enter the database name identified in Step 3.
    4. Enter the port number.
    5. Select Username and Password as the Authentication Mechanism.
    6. Enter a Database username and password.
    7. Enter the schema name you intend to access.
    8. Click Create to save the configuration.
    9. Once saved, click Verify to test the connection.

Steps to connect to Cloudera Impala JDBC​

This guide outlines the steps required to gather the necessary connection details from your Cloudera Impala Warehouse to establish a JDBC connection.

Prerequisites​

  • You must have an Cloudera data platform account with access to associated database.

Reference: Cloudera Setup Guide

To configure Cloudera Impala JDBC connection gather the below details from your instance:

  1. Navigate to your Cloudera Impala Warehouse instance and select the specific instance you wish to connect to.

  2. Click on Actions tab and hit the Copy JDBC Url value. This URL is crucial for configuring the Database Server URL in Abacus.AI connection setup.

Cloudera Impala Copy JDBC URL
  1. When filling out the connection details in your Abacus.AI Cloudera Impala setup, follow these steps:

    1. Choose the Cloudera Impala JDBC Driver.
    2. Database Server URL: Enter the hostname of the database server. This is the portion of the connection string that identifies the server, excluding the port number and any other parameters.

    Example: For a JDBC URL formatted like this, you should only use HOSTNAME

    jdbc:impala://[HOSTNAME]:443/default;AuthMech=3;transportMode=http;...

    1. Enter the database name.
    2. Enter the port number mentioned in your JDBC URL
    3. Select Username and Password as the Authentication Mechanism.
    4. Enter the Workload username and password.
    5. HTTP Path: It can be found within your JDBC URL
    6. SSL Mode: If your URL contains SSL=1 then select the Require option
    7. Click Create to save the configuration.
    8. Once saved, click Verify to test the connection.
Abacus Impala JDBC Setup Form