TDEngine SQL Client
TDengine is an industrial data platform purpose-built for the IoT (Internet of Things), combining a time series database with essential features like stream processing, data subscription, and caching. QStudio is a free SQL GUI, it allows running SQL scripts, easy browsing of tables, charting and exporting of results. It works on every operating system, with every database including TDEngine.
Setting up a TDengine connection in QStudio
Start TDEngine
We will use docker to quickly launch an instance of TDEngine:
This will output something similar to the below when it runs successfully.
TDengine Server 3.0 uses TCP port 6030.
Port 6041 is used by taosAdapter for the REST API service.
Ports 6043 through 6049 are used by taosAdapter for other connectors.
Connecting to a Server
When you first open QStudio it will look like the image below.
- Click on the menu options
Server->Add Server
or on the add server button on the toolbar. - Server Type: TDEngine
- Host:localhost
Port: 6041 - Username: root
Password: taosdata - Click Add
Either when you add the connection or once you try to run code in the code editor, you will be asked to install the driver automatically:
Sending Queries
Copy paste the below code into the SQL editor. Then highlight the commands you want to run and press Ctrl + e to run that code. See Keyboard Shortcuts.
Command | Shortcut |
---|---|
Run current statement | Ctrl + q |
Run highlighted text | Ctrl + e |
Run Line | Ctrl + Enter |
Run this code line by line otherwise it will FAIL
This will update your various results panels, result contains your table (excel export etc. supported), charts are generated based on your data and the console summarizes your recent commands
The Server Tree
The server tree populates but it's not a complete as we would like. We have reported the issue.
Well Done! You have now got QStudio querying your database successfully.
We want to make QStudio the best SQL analysis tool. If you have any problems or want additional features, please post on our github repo.