JDBC Driver for TigerGraph

Build 23.0.8839

Establishing a Connection

Creating a JDBC Data Source

You can create a JDBC data source to connect from your Java application. Creating a JDBC data source based on the CData JDBC Driver for TigerGraph consists of three basic steps:

  • Add the driver JAR file to the classpath. The JAR file is located in the lib subfolder of the installation directory.
  • Provide the driver class. For example:
    cdata.jdbc.tigergraph.TigerGraphDriver
  • Provide the JDBC URL. For example:
    jdbc:tigergraph:user=MyUserName;password=MyPassword;URL=MyURL;
    
    or
    
    jdbc:cdata:tigergraph:user=MyUserName;password=MyPassword;URL=MyURL;

    The second format above can be used whenever there is a conflict in your application between drivers using the same URL format to ensure you are using the CData driver. The URL must start with either "jdbc:tigergraph:" or "jdbc:cdata:tigergraph:" and can include any of the connection properties in name-value pairs separated with semicolons.

Connecting to TigerGraph

This section documents how to authenticate and connect to your TigerGraph instance.

Authenticate to TigerGraph Server

To authenticate requests to TigerGraph Server, set the following properties:

  • AuthScheme: Set this property to 'Basic'.
  • User: Set this property to your TigerGraph user name.
  • Password: Set this property to your TigerGraph user password.
  • Url: Set this property to the domain name or IP of your TigerGraph instance.
  • Port: Set this property to the port of your TigerGraph server instance (14240 by default).
  • TigerGraphEdition: Set this property to 'TigerGraph Server'.
See this page for notes on configuring a TigerGraph Server account: Managing Credentials

Authenticate to TigerGraph Cloud

To authenticate requests to TigerGraph Cloud, set the following properties:

  • User: Set this property to your TigerGraph database user name.
  • Password: Set this property to your TigerGraph database user password.
  • Url: Set this property to the domain name or IP of your TigerGraph instance.
To configure a TigerGraph Cloud user:
  1. From the Cloud portal, go to Clusters.
  2. Find the cluster you want to create users for, and select Access Management
  3. From the Cluster Access Management page, click Database Access.
  4. Click Add new users and specify the username and password. Note: The password will not be visible again after leaving this page.
  5. Click Role Management, select 'superuser' from the 'Select a role' list, then select the created user and click Save.
See this page for additional notes on configuring a TigerGraph Cloud database user: Managing Database Users

Secret-Based Authentication

To authenticate using a Secret, set the following properties:

  • AuthScheme: Set this property to 'Secret'.
  • Secret: Set this property to your generated secret.
  • Url: Set this property to the domain name or IP of your TigerGraph instance.
  • Schema: Set this property to the graph name your secret has been generated for.
Secrets can be generated for a given graph in the TigerGraph Admin Portal.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839