Skip to Content
Clients & toolsJDBC driver

JDBC driver

Thunderduck speaks to JDBC clients — DataGrip, DBeaver, IntelliJ, anything that takes a driver jar — through a driver that submits SQL to the API and polls for results.

Source, issues and the license are in the thunderduck-jdbc repository on GitHub .

Download

The driver is published on Maven Central as io.thunderduck:thunderduck-jdbc.

  • SQL tools (DataGrip, DBeaver, IntelliJ): download the jar from that page and add it as a custom driver.
  • JVM applications: add the dependency. The example shows the current version; the Maven Central page always shows the newest one.
<dependency> <groupId>io.thunderduck</groupId> <artifactId>thunderduck-jdbc</artifactId> <version>0.2.1</version> </dependency>
implementation("io.thunderduck:thunderduck-jdbc:0.2.1")

Connection

jdbc:thunderduck://api.thunderduck.ai

Authenticate either by signing in with your Thunderduck account (see Sign in with your account) or with an API token created in the console (Settings → API tokens). For a token, use it as the password; the username is ignored.

Sign in with your account

For desktop tools such as DataGrip and DBeaver, you can sign in as yourself instead of creating a token:

jdbc:thunderduck://api.thunderduck.ai/?auth=browser

When you connect, your browser opens the Thunderduck sign-in page (Google or email, the same as the console). The first time, a consent screen asks you to allow “Thunderduck JDBC driver”. Once you approve, the connection continues. Connections opened by the same application share the sign-in, so you are not asked again for each one.

Queries run with your own catalog access and appear in Query History with the source “JDBC”.

You need a Thunderduck user already: sign in to the console once before using the driver.

No browser: servers, containers and CI

Browser sign-in needs a desktop browser on the same machine as the driver. On a server, in a container or in CI, use an API token instead.

Properties

PropertyValuesDefault
authtoken, browsertoken
tokenCachefile, nonefile
issuersign-in server URLhttps://auth.thunderduck.ai/realms/thunderduck

With browser, the driver listens for the sign-in callback on 127.0.0.1, ports 33500–33509.

Staying signed in

With tokenCache=file the driver saves a refresh token to ~/.thunderduck/credentials.json, readable only by you, so you do not sign in on every connect. Nothing else is stored. Delete the file to sign out.

With tokenCache=none nothing is written to disk, and each connection signs in separately.

Sign-in follows the same session lengths as the console. Unless your administrator changed them, a session ends after about 30 minutes idle or 10 hours in total; the browser then opens again on the next connect or query.

Security

With the default Thunderduck sign-in, the driver only sends tokens to api.thunderduck.ai over https, and it refuses to follow redirects to other hosts. It also checks that the sign-in answer came from the sign-in server you configured, and stops if it did not.

Only use a custom issuer that your administrator gave you.

Errors

MessageWhat to do
Sign-in was cancelled or timed out (no response within 5 minutes).Connect again and finish signing in within 5 minutes.
This account has no Thunderduck access yet — sign in to the console once at https://console.thunderduck.ai, then try again.Sign in to the console once, then reconnect.
Your Thunderduck account is suspended.Ask your administrator.
No free local port for sign-in (33500–33509); close other sign-in windows or use an API token (auth=token)Close other pending sign-in windows, or use an API token.
auth=browser needs a desktop browser on this machine; on a server or in a container, use an API token (auth=token)Use an API token on machines without a desktop.
Sign-in expired — reconnect to sign in again.Reconnect; the browser opens again.
Sign-in was answered by a different sign-in server than the one configured; not continuing.Check the issuer in your connection URL; use the one your administrator gave you.

When to use an API token instead

Use an API token for servers, CI and scheduled tools, where nobody is there to sign in.

Addressing

Exactly as everywhere else — three parts, with the middle part depending on the catalog type:

SELECT * FROM sales_pg.public.orders LIMIT 100; SELECT * FROM lake.default.events LIMIT 100;

Two-part names (schema.table) also resolve when unambiguous across your catalogs, which is what makes schema browsing work in tools that assume a single database.

What tools should expect

  • Metadata browsing works: catalogs, schemas and tables come from the metadata Thunderduck already collected, so expanding a tree does not hit your databases.
  • DataGrip: load every schema. In the data source’s Schemas tab, set the pattern to *:*. “All databases” alone loads only each catalog’s default schema, and Thunderduck catalogs have none.
  • Results are paged. The driver fetches a page at a time rather than streaming, so a large result set arrives in chunks.
  • Long queries are polled, not held open, so a client timeout does not cancel the query.

Token hygiene

A token carries your company and your user. Create one per tool so you can revoke a laptop without breaking your BI server, and prefer read-only tokens for anything that only reads.