Metadata-Version: 2.3
Name: harlequin-clickhouse
Version: 0.1.1
Summary: A Harlequin adapter for Clickhouse
Keywords: harlequin,clickhouse,sql,tui
Author: Thomaub
Author-email: Thomaub <github.thomaub@gmail.com>
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Database
Classifier: Typing :: Typed
Requires-Dist: harlequin>=2.0
Requires-Dist: clickhouse-driver>=0.2.7
Requires-Dist: ruff>=0.1.6 ; extra == 'dev'
Requires-Dist: pytest>=7.4.3 ; extra == 'dev'
Requires-Dist: mypy>=1.7.0 ; extra == 'dev'
Requires-Dist: pre-commit>=3.5.0 ; extra == 'dev'
Requires-Dist: importlib-metadata>=4.6.0 ; python_full_version < '3.10' and extra == 'dev'
Requires-Dist: testcontainers[clickhouse]>=4.4.0 ; extra == 'dev'
Requires-Python: >=3.9, <3.14.0
Project-URL: Homepage, https://github.com/harlequin-org/harlequin-clickhouse
Project-URL: Issues, https://github.com/harlequin-org/harlequin-clickhouse/issues
Project-URL: Repository, https://github.com/harlequin-org/harlequin-clickhouse
Provides-Extra: dev
Description-Content-Type: text/markdown

# harlequin-clickhouse

A Harlequin adapter for ClickHouse databases.

## Installation

You must install the `harlequin-clickhouse` package into the same environment as harlequin. The best and easiest way to do this is to use uv to install Harlequin with the additional package:

```bash
uv tool install harlequin --with harlequin-clickhouse
```

## Usage and Configuration

Run Harlequin with the `-a clickhouse` option and pass a ClickHouse DSN as an argument:

```bash
harlequin -a clickhouse "clickhouse://default:@localhost:9000/default"
```

You can also pass all or parts of the connection string as separate options. The following is equivalent to the above DSN:

```bash
harlequin -a clickhouse --host localhost --port 9000 --database default --user default
```

Many more options are available; to see the full list, run:

```bash
harlequin -a clickhouse --help
```

## Setup ClickHouse

This is from the [ClickHouse single node with Keeper](https://github.com/ClickHouse/examples/blob/main/docker-compose-recipes/recipes/ch-1S_1K/README.md) in the [ClickHouse Examples](https://github.com/ClickHouse/examples) repo

Single node ClickHouse instance leveraging 1 ClickHouse Keeper

By default the version of ClickHouse used will be `latest`, and ClickHouse Keeper
will be `latest-alpine`. You can specify specific versions by setting environment
variables before running `docker compose up`.

```bash
export CHVER=23.4
export CHKVER=23.4-alpine
docker compose up
```
