Skip to main content

JDBC: Java Database Connectivity

JDBC (Java Database Connectivity) is a standard API for connecting to and interacting with databases.

Spice supports JDBC clients through a JDBC driver implementation based on the Flight SQL protocol. This enables any JDBC-compatible application to connect to Spice, execute queries, and retrieve data.

Download and install the Flight SQL JDBC driver​

Download the Flight SQL JDBC driver​

  • Find the appropriate Flight SQL JDBC driver version.
  • Click Browse next to the version you want to download
  • Click the flight-sql-jdbc-driver-XX.XX.XX.jar file (with only the .jar file extension) from the list of files to download the driver jar file

Add the driver to your application​

Follow the instructions specific to your application for adding a custom JDBC driver. Examples:

Tableau:

  • Windows: C:\Program Files\Tableau\Drivers
  • Mac: ~/Library/Tableau/Drivers
  • Linux: /opt/tableau/tableau_driver/jdbc - Start or restart Tableau

Full instruction

JetBrains DataGrip:

  • In Database Explorer menu, select "+" and choose "Driver"
  • Follow the steps to add the JDBC .jar file

Full instruction

DBeaver:

  • In the DBeaver application menu bar, open the "Database" menu and choose: "Driver Manager"
  • Click the "New" button and follow instructions to add JDBC .jar file.

Full instruction

Configure JDBC connection​

  1. Use the following configuration settings:
  • URL: jdbc:arrow-flight-sql://{host}:{port}
  • Dialect: PostgreSQL

For example:

  1. Ensure Spice is running
  2. Click Connect

Note: Spice has TLS support. For testing or non-production use cases for Spice without TLS, the following JDBC connection URL will bypass TLS jdbc:arrow-flight-sql://{host}:{port}?useEncryption=false&disableCertificateVerification=true.

Execute Test Query​

In the configured application, run a sample query, such as SELECT * FROM taxi_trips;

Query Results