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”
‍
![](https://cdn.prod.website-files.com/66098d655e9084457b00d675/665e6ae1a53fb3b0bf24a202_AD_4nXcBp85EFoayaDpkbvuhRPuXeLP6l0LNuq9wemj8jNyDFmNlGlElCd9Od9F4KoXYk-ZrlZKEXSbndoDMiypSm4pC1pFMRcZ1qigAD1-1PIQo3WevYGY1Ykk1me_TdkUKTckoZc45mSBC_uc6WTadzVbNWVbn.png)
‍
In the resulting screen select “+ Database” and select “Trino” as the database type:
‍
![](https://cdn.prod.website-files.com/66098d655e9084457b00d675/665e6b3aac05fcdfbd1a9684_AD_4nXe8pYOM0SI4t9a_4WCnwaLWHUXdhS66rx0qpsPvFUDHpP0LcXD3Yi57qh9tdum3IcQbkvN5ylAwtkPzCUdtytRB08eQ6p0Px-70RfPDBamRYmKOIboz3r0gMbk5jpQpHOrRS6z2zJAduLofxde7sPZKxlY.png)
‍
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:
‍
![](https://cdn.prod.website-files.com/66098d655e9084457b00d675/665e6de63fe942905bf21828_AD_4nXf_s3jqhmD5vHU8ITAbdKNGTbvJ9sP0jc0CARHhymxiY-31bZmX3QB5zYkQRCILxLw5fUXkzhSGFdILE8BGunc4CotzXsgA_DyMSEgJMY6cerLrNmOcgbG-KowAi7KV3BO-gPFY0lfHu4GHwdi-vMl9qlvS.png)
‍
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”
‍
![](https://cdn.prod.website-files.com/66098d655e9084457b00d675/6662f88915b4b41e4fc4a4b9_Picture5.png)
‍
‍
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!
‍
![](https://cdn.prod.website-files.com/66098d655e9084457b00d675/6662f8b918a142234606b5e0_Picture6.png)
‍