Skip to main content
Firebolt’s type 4 JDBC driver lets Java applications connect to Firebolt. The JDBC driver is open-source software released under an Apache 2 license. You can browse, fork, download, and contribute to its development on GitHub.

Download the JAR file

The Firebolt JDBC driver is provided as a JAR file and requires Java 11 or later. Download the driver from GitHub JDBC releases.

Adding the Firebolt JDBC driver as a Maven dependency

To connect your project to Firebolt using Apache Maven, add the Firebolt JDBC driver as a dependency in your pom.xml configuration file. Link to the Firebolt Maven repository, so that Maven can download and include the JDBC driver in your project, as shown in the following code example:
In the previous code example, replace <version>3.3.0</version> with the latest version available in the Firebolt Maven Central repository.

Adding the Firebolt JDBC driver as a Gradle dependency

If you are using the Gradle Build Tool, you can configure your Gradle project to use the Firebolt JDBC driver by specifying Apache’s Maven Central as a repository and adding the Firebolt JDBC driver as a dependency as follows:
In the previous code example, replace 3.3.0 with the latest version available in the Firebolt Maven Central repository.

Connecting to Firebolt with the JDBC driver

Provide connection details to the Firebolt JDBC driver using a connection string in the following format:
In the previous connection example, the following apply:
  • <database> - Specifies the name of the Firebolt database to connect to.
  • <connection_params> - A list of connection parameters formatted as a standard URL query string.

Authentication

To authenticate with managed Firebolt, use a service account ID and secret. A service account, which is used for programmatic access to Firebolt, uses a client_id and a client_secret for identification. To ensure compatibility with tools external to Firebolt, you can specify the service account’s client_id as user and client_secret as password. The following are examples of how to specify connection strings for authentication and configuration: Example The following example connection string configures the Firebolt JDBC driver to connect to my_database using a specified client_id and secret_id for authentication:
The previous example string also specifies an account name my_account, an engine name my_engine, a buffer size of 1000000 bytes, and a connection timeout of 10000 milliseconds, or 10 seconds. Example The following example provides client_id and client_secret as separate properties, rather than embedding them directly in the connection string, as shown in the previous example. Connection string:
Connection properties:
Example The following example connects to my_database using only connection properties for authentication and parameters, without including any parameters directly in the string. Connection string:
Connection properties:
Example The following example is a minimal URL that connects to my_database using client_id and client_secret as connection properties for authentication, omitting the engine name and therefore connects to default engine and relying on default values for all other parameters: Connection string:
Connection properties:
Because the previous configuration example omits specifying the engine name, my_database connects to the default engine.
Since the connection string is a URI, make sure to percent-encode any reserved characters or special characters used in parameter keys or parameter values.

Available connection parameters

The following table lists the available parameters that can be added to a Firebolt JDBC connection string. All parameter keys are case-sensitive.

System settings as connection parameters

In addition to the parameters specified in the previous table, any system setting can be passed as a connection string parameter. For example, to set a custom time zone, use the following format:

Applying system settings using SET

In addition to passing system settings as connection string parameters, any system setting can be passed using the SQL SET command. Multiple SET statements can be run consecutively, separated by semicolons, as shown below:

Connection validation

The Firebolt JDBC driver validates the connection by sending a SELECT 1 query on the connected engine URL. If this query fails, the driver throws an exception.

Full reference documentation

The complete documentation for classes and methods in the Firebolt JDBC driver is available in the Firebolt JDBC API reference guide.