Clickhouse SQL Client
ClickHouse is an open-source column-oriented DBMS for online analytical processing. QStudio is a free SQL Client, it allows running SQL scripts, easy browsing of tables, charting and exporting of results. It works on every operating system, with every database including Clickhouse.
Setting up a Clickhouse connection in QStudio
Start Clickhouse
Clickhouse can either be ran locally or you can use Clickhouse Cloud. To keep this tutorial simple we opted for cloud. Simply start a small service in your chosen region. The connection details should be provided, similar to shown:
Connecting to a Server
Clickhouse was in the past mostly provided by Yandex (Russian Google), increasingly it is supplied by Clickhouse.com. QStudio includes both drivers, for this demo make sure to use the Clickhouse.com driver.
When you first open QStudio click on the menu options Server->Add Server
or on the add server button on the toolbar.
Then set the details:
- Server Type: Clickhouse.com
- Note for Host you MUST include https://
Host: https://tcez9f65x4.eu-west-1.aws.clickhouse.cloud
Port: 8443 - Username: default
Password: XXXXXXXXXXX - Click Add
Sending Queries
You can run queries by highlighting selected code and pressing 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 |
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
Clickhouse Play Database
The easiest way to play with Clickhouse is to use the Play Database.
- Server Type: Clickhouse.com
- Click URL
- URL: jdbc:ch:https://play.clickhouse.com:443
- Username: explorer
- Click Add
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.