JDBC driver #

The Java Database Connectivity (JDBC) driver enables any application supporting a JDBC driver to connect to Starburst clusters. The application can then issue SQL queries and receive results.

Typically the applications are JVM-based, or support JDBC driver usage with a different mechanism. Using an applications with the JDBC driver generally follows the same steps.

Connection information #

Get the connection information and the cluster version for the cluster you want to connect to and use to run queries.

Add the driver to your client #

The way to add the JDBC driver to your client application varies for each application.

Some applications, such as DBeaver, automatically download and configure the driver, or include it by default and no action is necessary.

Many applications, however, require you to download the driver and place it in a directory that varies for each application. Refer to your client application’s documentation for the necessary details.

The JDBC driver needs to be compatible with the version of the cluster you are connecting to.

Download the JDBC driver #

You can request the JDBC driver to match a specific Starburst version from Starburst Support.

Alternatively, to gain access to SEP archives, visit the Starburst website and click either Get Started or Download Free.

This opens a dialog that prompts for your name, email address, and location. Fill out the form using a valid email address, then click Free Download.

Click the link to the Downloads page in the resulting email. The page is organized into Long-Term Support (LTS) and Short-Term Support (STS) sections. The LTS section is split into Starburst Enterprise and Client applications steps.

If your cluster version is a current release, use the LTS Step 2 or STS sections to download the JDBC driver version that matches your cluster version.

You can also download the JDBC driver binary directly from the link in the reference documentation:

  • For cluster versions older than 350, download JDBC driver version 350.
  • For cluster versions 350, 354, and newer, download the matching JDBC driver version:

Use the reference documentation’s version selector in the top right corner to select the download page for different releases, or contact Starburst Support.

Create a connection to the cluster #

With an installed driver you can now configure a connection to a cluster. Typically, you only need the connection information. Other details such as the JDBC URL are automatically configured in many applications, or can be seen and updated in a user interface dialog.

The main parameters are the driver classname, which is typically preconfigured by your client driver integration, the JDBC URL and the credentials from the needed connection information.

Driver version 350 and older:

  • Classname: io.prestosql.jdbc.PrestoDriver
  • JDBC URL: jdbc:presto://host:port

Driver version 354 and newer:

  • Classname: io.trino.jdbc.TrinoDriver
  • JDBC URL: jdbc:trino://host:port

If your application does not include these out of the box, check the reference documentation for the JDBC driver for the correct values and other supported parameters.

Enable JDBC TLS support #

If your Starburst cluster is configured to require a TLS connection from clients, you must configure your client as follows:

  • Specify a valid username and password for the authentication system in use on the coordinator, such as LDAP.
  • Specify the JDBC parameter TLS=true.

    • If the client UI provides an interface, such as a grid for specifying parameters, use that.
    • If not, you can append ?TLS=true to the JDBC connection string. For example:
    jdbc:trino://host:port?TLS=true
    

Start querying #

The configured connection can now be opened and you can start running queries.

For example, if your application allows you to write and run queries, you can see what catalogs are available:

SHOW CATALOGS;

Many applications provide a user interface to see the list of catalogs, schema, tables and much more.

Next steps #

Now you can take advantage of the features of your application, and potentially learn more about the SQL support in Starburst.