tabularis-clickhouse-plugin

July 27, 2026 · View on GitHub

tabularis-clickhouse-plugin

Build & Release Discord

A ClickHouse plugin for Tabularis, the lightweight database management tool.

This plugin enables Tabularis to connect to any ClickHouse instance and provides table and view browsing, inline CRUD, index management, and SQL query execution through a JSON-RPC 2.0 over stdio interface.

Discord - Join our discord server and chat with the maintainers.

Table of Contents

Features

  • Connection — Connect to any ClickHouse instance via host/port with optional authentication and TLS.
  • Database & Table Browsing — List databases (schemas), tables, and their columns with native ClickHouse types.
  • View Support — List views, retrieve their definitions and column metadata.
  • Index Inspection — List data-skipping indexes with name, type, columns, and granularity.
  • Query Execution — Run arbitrary SQL queries with pagination support.
  • Inline Editing — Insert, update, and delete rows directly from the Tabularis data grid.
  • DDL Generation — Generates CREATE TABLE, ALTER TABLE ADD/MODIFY/RENAME COLUMN, and ADD INDEX statements.
  • Cross-platform — Pre-built binaries for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x86_64).

Supported ClickHouse Data Types

CategoryTypes
IntegerInt8, Int16, Int32, Int64, Int128, Int256, UInt8, UInt16, UInt32, UInt64, UInt128, UInt256
Floating pointFloat32, Float64, Decimal
StringString, FixedString
Date/TimeDate, Date32, DateTime, DateTime64
OtherBoolean, UUID, IPv4, IPv6, Array, Tuple, Map, Nullable, LowCardinality, Enum8, Enum16

Installation

Automatic (via Tabularis)

If your version of Tabularis supports plugin management, the ClickHouse plugin can be installed directly from the application.

Manual Installation

  1. Download the latest release for your platform from the Releases page.
  2. Extract the archive.
  3. Copy tabularis-clickhouse-plugin (or tabularis-clickhouse-plugin.exe on Windows) and .tabularium into the Tabularis plugins directory:
OSPlugins Directory
Linux~/.local/share/tabularis/plugins/clickhouse/
macOS~/Library/Application Support/com.debba.tabularis/plugins/clickhouse/
Windows%APPDATA%\com.debba.tabularis\plugins\clickhouse\
  1. Restart Tabularis.

How It Works

The plugin is a standalone Rust binary that communicates with Tabularis through JSON-RPC 2.0 over stdio:

  1. Tabularis spawns the plugin as a child process.
  2. Requests are sent as newline-delimited JSON-RPC messages to the plugin's stdin.
  3. The plugin connects to ClickHouse via its HTTP interface and writes responses to stdout.

Connection state is pooled per URL — the same Client instance is reused for all operations within a session.

Query Syntax

The execute_query method accepts standard ClickHouse SQL:

-- Select rows
SELECT * FROM system.tables WHERE database = 'default'

-- Aggregation
SELECT database, count() AS table_count
FROM system.tables
GROUP BY database
ORDER BY table_count DESC

-- DDL
CREATE TABLE my_db.events
(
    id       UInt64,
    event    String,
    ts       DateTime DEFAULT now()
)
ENGINE = MergeTree
ORDER BY (ts, id)

-- Add an index
ALTER TABLE my_db.events ADD INDEX idx_event (event) TYPE minmax GRANULARITY 1

Supported Operations

MethodDescription
test_connectionPing the ClickHouse server
get_databasesList all databases
get_schemasList all databases (alias for get_databases)
get_tablesList tables in the given database
get_columnsReturn column names and types for a table or view
get_foreign_keysReturns [] (ClickHouse has no FK constraints)
get_indexesList data-skipping indexes for a table
get_viewsList views in the given database
get_view_definitionReturn the CREATE VIEW statement for a view
get_view_columnsReturn column metadata for a view
get_routines / get_routine_parametersReturns [] (no stored routines in ClickHouse)
execute_queryRun a SQL query with optional pagination
insert_recordInsert a new row
update_recordUpdate a single column value by primary key
delete_recordDelete a row by primary key
get_schema_snapshotFull schema dump (all tables + columns)
get_all_columns_batchColumn metadata for all tables in a database
get_all_foreign_keys_batchReturns {}
get_create_table_sqlFetches the CREATE TABLE statement from SHOW CREATE TABLE
get_add_column_sqlGenerates ALTER TABLE ... ADD COLUMN ...
get_alter_column_sqlGenerates ALTER TABLE ... RENAME/MODIFY COLUMN ...
get_create_index_sqlGenerates ALTER TABLE ... ADD INDEX ... TYPE minmax
get_create_foreign_key_sqlReturns a not-supported note
drop_indexDrops a data-skipping index
drop_foreign_keyReturns a not-supported error

Building from Source

Prerequisites

  • Rust (edition 2021)
  • A running ClickHouse instance (for integration tests)

Build

cargo build --release

The binary will be located at target/release/tabularis-clickhouse-plugin.

Install Locally

A convenience script is provided to build and copy the plugin to the Tabularis plugins directory:

./sync.sh

Development

Testing the Plugin

A simulated Tabularis integration test is included (spawns the plugin and sends JSON-RPC requests via stdio):

cargo run --bin test_plugin

Manual JSON-RPC test via shell

echo '{"jsonrpc":"2.0","method":"test_connection","params":{"params":{"host":"localhost","port":8123,"database":"default","username":"default","password":"","ssl_mode":"disable"}},"id":1}' \
  | ./target/release/tabularis-clickhouse-plugin

Tech Stack

  • Language: Rust (edition 2021)
  • Database driver: clickhouse v0.13 (async HTTP client)
  • Serialization: serde + serde_json
  • Async runtime: tokio
  • Protocol: JSON-RPC 2.0 over stdio

Changelog

License

Apache License 2.0