ClickHouse Wizard Tower is ClickHouse HTML client that can be set as ClickHouse HTTP endpoint and served directly by ClickHouse itself. In other words we can describe it as ClickHouse Play on steroids.
- Run selected query and Alt+Enter keyboard shortcut
- Databases structure tree
- ClickHouse sessions
- Result as table with frozen header and eclipsis on long content
- Vega Lite charts support
- Vanilla JS, CSS and HTML, the only external dependency is Vega Lite
Instalation and setup
- Copy chwt.html file to ClickHouse User Files.
- Add custom http handler to ClickHouse config.
<http_handlers> <defaults/> <rule> <methods>GET</methods> <url>/chwt</url> <handler> <type>static</type> <content_type>text/html; charset=UTF-8</content_type> <response_content>file:///chwt.html</response_content> </handler> </rule> </http_handlers>
- Restart ClickHouse to reload config.
For quick idea you can try the following SQL query
and Vega Lite spec
Lines 3 and 4 define the size of chart, keep it
container so the chart is responsive and size is inherted from parent container.
Line 5 defines transparent background, so the chart stays visualy same as client, but you are welcome to change it to any color you like.
Line 8 defines data for chart, it is important to keep it as empty array as the array is filled by the client itself based on query provided in sql input.