Querying & Filtering

StreamOps' SQL workbench is a very powerful tool allowing you to query your stream with regular SQL queries.

To enter SQL Workbench mode click on the Workbench icon in the top middle of the page as seen below.

SQL workbench page

The SQL Workbench page is where you can perform many SQL queries on your data. From the SQL Workbench page you can query a topic and limit the results. You can also select if you'd like to query live data as it enters the stream or do a snapshot in time from when you ran your query.

Building A Simple Query

In the SQL Workbench page to start building a basic query you first need to select which topic you'd like to query. You can either select the topic by clicking on it in the left hand topics drop down menu or by writing sql (FROM <topic) statement directly into the SQL editor. In the SQL editor you are able to write sql compliant statements. For this example we will query all items in a single topic. This can be done by selecting the topic you'd like to query on the left hand side, this will auto-populate the sql editor with a select * from <topic> statement. When you are ready to run your query click the run button on top of the sql editor as seen below.

Running a SQL Query in the SQL Editor

As you can see in the above screenshot, once you click the run button your query's results will be displayed in the results grid at the bottom right hand side of the page. You can limit your query but clicking the drop down box to limit results or by directly writing a limit statement in SQL. NOTE: your SQL will always have precedence over any UI customization you choose. For example if you write a limit 50 statement in SQL but use the limit 500 drop down in the UI, your results will be limited to 50 as written in your SQL statement.

Last updated