DBeaver

Configure DBeaver to query Spice.ai via JDBC
  1. Start the Spice.ai runtime with a dataset loaded. Follow the quickstart guide to get started.

  2. Download DBeaver Community Edition.

  3. Download the Apache Arrow Flight SQL JDBC driver - choose the “jar” option.

  4. Launch DBeaver

  5. In the DBeaver application menu bar, open the “Database” menu and choose: “Driver Manager”:
    Driver manager menu option

  6. Click the “New” button on the right: Driver manager new button

  7. Add the JDBC jar file:

    1. Click the “Libraries” tab
    2. Click the: “Add File” button
    3. Choose the “flight-sql-jdbc-driver-15.0.1.jar” jar file (the file downloaded in step 3 above) - and click “Open” Select jar file
    4. Close the Driver editor window with the blue “OK” button on the lower-right
  8. Enter the driver settings:

    1. Click the “Settings” tab
    2. In the “Driver Name” field - enter: Apache Arrow Flight SQL
    3. In the “URL Template” field - enter: jdbc:arrow-flight-sql://{host}:{port}?useEncryption=false&disableCertificateVerification=true
    4. In the “Driver Type” drop-down box - choose: “SQLite”
    5. Select “No authentication”
    6. The driver manager “Edit Driver” window should look like this: Driver Manager completed
    7. Click the blue “OK” button on the lower-right to save the driver
    8. Close the “Driver Manager” window by clicking the blue “Close” button on the lower-right.
  9. Create a new Database Connection:

    1. In the DBeaver application menu bar, open the “Database” menu and choose: “New Database Connection”:
      New Database Connection
    2. In the “Connect to a database” window - type: Flight in the search bar
    3. Choose the Apache Arrow Flight SQL driver - the window should look like this:
      Connect to a database window
    4. Click the blue “Next >” button on the bottom of the window
    5. On the next screen, the JDBC URL should be filled out already - just supply the Host (localhost) and Port (50051) values for the Spice.ai runtime. The window should look like this:
      Connect to a database window 2
    6. Click the “Test Connection” button - the window should look like this:
      Test Connection results
    7. Click the blue “OK” button to close the Connection test window
    8. Click the “Connection details (name, type, …)” button on the right
    9. In the “General” section, enter: Spice.ai Runtime for the “Connection name”. It should look like this: Name the Database Connection
    10. Click the blue “Finish” button to save the connection
  10. Run a query:

    1. Right-click on the Database Connection on the left - choose: “SQL Editor”, and then: “Open SQL Console” as shown here:
      Open SQL Console
    2. In the Console window - run a query - something like: SELECT * FROM taxi_trips;
    3. Click the triangle button to execute the SQL statement - as shown below (or use keyboard shortcut: Ctrl+Enter):
      Execute SQL
    4. See the query results as shown in this screenshot: Query Results
    5. DBeaver is now configured to query the Spice.ai runtime using SQL! 🎉