Legacy JDBC Driver
Dremio provides a JDBC driver that allows client applications to connect to Dremio Cloud.
You can download the JDBC driver from here. The driver does not require installation.
It is recommended to use the JDBC driver for Arrow Flight SQL, rather than this legacy JDBC driver.
Supported Authentication Methods
- Use personal access tokens. To generate one, see Personal Access Tokens.
- Use JSON Web Tokens (JWT) from an external token provider. To use a JWT, you must have OAuth enabled in Dremio Cloud. For more information about using JWTs, see External Token Providers.
Construct a Connection String for JDBC Applications
If you are using the JDBC driver to connect to Dremio Cloud from a supported client application, refer to the documentation for creating connections from that application.
If you want to start with the base JDBC connection string for your Dremio Cloud project:
Click the Project Settings
icon in the side navigation bar.Select General Information in the project settings sidebar.
Copy the connection string that is in the JDBC Connection field.
To construct a connection string:
Set the subprotocol to
jdbc:dremio:.Set the property
directequal tosql.dremio.cloud:443.Add one of these types of authentication credentials for connecting from your JDBC client application to Dremio Cloud:
Use a personal access token (PAT) in either of the following ways:
Set
Use PAT as password when client app does not support OAuthusernameto$tokenand use the PAT as the password when the client application does not support OAuth:jdbc:dremio:direct=sql.dremio.cloud:443;username=$token;password=<personal-access-token>;Set
Use PAT as passwordtoken_typetopersonal_access_token, use the PAT as the password, and setusernameto null when the client application supports OAuth:jdbc:dremio:direct=sql.dremio.cloud:443;token_type=personal_access_token;password=<personal-access-token>;username=;
Use a JSON Web Token (JWT). You can use a JWT when the tool used with the JDBC driver supports OAuth:
Use a JWTjdbc:dremio:direct=sql.dremio.cloud:443;token_type=jwt;password=<jwt>;username=;
Set the property
Set ssl to truesslequal totrue.jdbc:dremio:direct=sql.dremio.cloud:443;token_type=personal_access_token;password=<personal-access-token>;username=;ssl=true;Add the ID of the project that you are connecting to.
Set the project IDjdbc:dremio:direct=sql.dremio.cloud:443;token_type=personal_access_token;password=<personal-access-token>;username=;ssl=true;project_id=<project-id>;(Optional) Route queries to a particular engine in your project, set the property
Set engine nameengineto the name of an engine.jdbc:dremio:direct=sql.dremio.cloud:443;token_type=personal_access_token;password=<personal-access-token>;username=;ssl=true;engine=<engine-name>;
Encryption Properties
| SSL JDBC Connection Parameter | Type | Description | Default Value | Required |
|---|---|---|---|---|
| disableCertificateVerification | boolean | Controls whether the driver verifies the host certificate against the trust store.
| false | No |
| disableHostVerification | boolean | Forces the driver to verify that the host in the certificate is the host being connected to.
| false | No |
| ssl | boolean | Forces the client to use an SSL encrypted connection to communicate with the Dremio server.
Note: | false | Yes |
| trustStoreType | string | The trustStore type. Accepted value is: JKS PKCS12 The following property only applies to Windows.
| None | No |
| trustStore | string | Path to the truststore. If this parameter is not specified, it defaults to Java truststore ( $JAVA_HOME/lib/security/cacerts) and the trustStorePassword parameter is ignored. | $JAVA_HOME/lib/security/cacerts | No |
| useSystemTrustStore | boolean | Bypasses trustStoreType and automatically picks the correct truststore based on the operating system:
| true | No |
| trustStorePassword | string | Password to the truststore. | None | No |