Connect a JDBC Client to Streambased

Java Database Connectivity (JDBC) is a Java API that allows applications to connect to databases. It enables Java based applications to execute queries and retrieve data. Let's real-time it up!

We have used Squirrel SQL, an free and open source JDBC client for this tutorial. Other JDBC clients and applications will have a similar setup procedure but may need additional steps. Please refer to the documentation of your specific client for these.

Prerequisites:

  • A running Streambased instance, for instructions see here

  • A JDBC supporting client/library

Step 1: Download the Trino JDBC Driver

Streambased is 100% compatible with the Trino JDBC driver, you can obtain it from here. Store this in a place that is easily accesible by your client application.

Step 2: [Squirrel SQL specific] Create a new driver

  1. Select New Driver.

  2. Enter the following information in each field:

Property Name
Value

Name

Streambased

Example URL

jdbc:trino://host:port?SSL=true

Website URL

https://streambased.io

  1. Select the Extra Class Path tab, Click Add and navigate to the JDBC driver .jar you downloaded in Step 2.

  2. Click List Drivers and Set the Class Name to io.trino.jdbc.TrinoDriver.

  3. Click OK.

Step 3: [Squirrel SQL specific] Create a new alias

  1. Select New Alias

  2. Enter the following information in each field:

Property Name
Value

Name

Streambased (or other meaningful name)

Driver

The one created in Step 3

Url

jdbc:trino://[server host]:[server port]/kafka

By default server port is 8080 and server host is the name of the host on which the docker instance has been launched.

Step 4: [Squirrel SQL specific] Run some queries

Clicking Connect will bring up a SQL editor, happy querying!

Last updated