We are speaking at Kafka Summit!

Connecting to Streambased
From Superset

Learn how to seamlessly integrate Superset with Streambased, enabling real-time data visualization and analytics for your streaming data.

Pradeep Sekar
Devrel
31/01/2024

Table of Contents

Share This Tutorial
Facebook
Twitter
LinkedIn

Pre-requisites

You must have a running Streambased server before following this guide. For details on how to run Streambased see the documentation here: https://streambased-io.github.io/streambased/index.html or run one of the demos here: https://github.com/streambased-io/streambased-demos

Step 1: Add a database

Locate the “Settings” button in the top right and select “Database Connections”

In the resulting screen select “+ Database” and select “Trino” as the database type:

Step 2: Configure the database

In the resulting screen configure the following properties:
				
					DISPLAY NAME -> Streambased #(or other meaningful name to you)
SQLALCHEMY URI -> trino://streambased-server:8080/kafka

				
			
Note: The above configuration assumes that Streambased Server is running on a host named “streambased-server”, adjust the host and port settings according to your deployment.

Step 3: Test the connection

Click “TEST CONNECTION”, you should receive a message similar to the following:
Finally, click “CONNECT” to finalise the connection.

Step 4: Additional Configs

The following additional configurations are optional but we recommend them to get the best Streambased experience.

From the databases list, find your Streambased connection and select “Edit”

In the resulting screen click “ADVANCED” -> “SQL LAB”

We suggest to enable the “ALLOW DML” options. This enables the following in your SQL queries:

				
					USE kafka.streambased -> # set the current schema for convenience

SET SESSION use_streambased = true/false -> enable/disable Streambased Acceleration

SET SESSION streambased_connection = {..} -> # pass custom Kafka connection configs to Streambased, you can use this to impersonate users and tune consumer parameters. For more info see: https://streambased-io.github.io/streambased/installation.html#connecting-to-streambased-server

				
			

Step 5: Run some test queries

Now you can see your database and schema from SQL Lab. Happy querying!
Share This Tutorial
Facebook
Twitter
LinkedIn