Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pages/preview/memgql/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ description: MemGQL release notes

# MemGQL Changelog

## MemGQL v0.2.0

- Added Clickhouse connector
- MCP server

## MemGQL v0.1.0 - March 29th, 2026

- GQL parser with ISO/IEC 39075 standard support including quantified path patterns
Expand Down
11 changes: 11 additions & 0 deletions pages/preview/memgql/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ connections.
| `neo4j-gql` | GQL -> Cypher | Neo4j |
| `postgres` | GQL -> SQL | PostgreSQL |
| `duckdb` | GQL -> SQL | DuckDB (embedded) |
| `clickhouse` | GQL -> SQL | ClickHouse |
| `iceberg` | GQL -> SQL | Iceberg via Trino |
| `multi` | Per-connector | Multiple backends simultaneously |

Expand Down Expand Up @@ -71,6 +72,16 @@ connections.
| `DUCKDB_PATH` | `:memory:` | Path to DuckDB file |
| `MAPPING_FILE` | _(none, uses built-in default)_ | Path to JSON mapping file |

## ClickHouse (`clickhouse`)

| Variable | Default | Description |
|-------------------|---------------------------|---------------------------|
| `CLICKHOUSE_URL` | `http://localhost:8123` | ClickHouse HTTP API URL |
| `CLICKHOUSE_USER` | `default` | ClickHouse user |
| `CLICKHOUSE_PASS` | _(none)_ | ClickHouse password |
| `CLICKHOUSE_DB` | `default` | ClickHouse database |
| `MAPPING_FILE` | _(none, uses built-in default)_ | Path to JSON mapping file |

## Iceberg (`iceberg`)

| Variable | Default | Description |
Expand Down
98 changes: 98 additions & 0 deletions pages/preview/memgql/connect/clickhouse.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: ClickHouse
description: Connect MemGQL to ClickHouse.
---

# ClickHouse

The ClickHouse connector (`CONNECTOR_TYPE=clickhouse`) translates GQL queries
into ClickHouse-dialect SQL and executes them via the ClickHouse HTTP interface.
It requires a [mapping file](../quick-start.mdx#mapping-file) that maps graph
patterns to ClickHouse tables.

## 1. Start ClickHouse

```bash
docker network create memgql-net

docker run -d --rm \
--name clickhouse-dev \
--network memgql-net \
-p 9000:9000 \
-p 8123:8123 \
--ulimit nofile=262144:262144 \
-e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 \
-e CLICKHOUSE_PASSWORD="" \
clickhouse/clickhouse-server:latest
```

## 2. Seed data

```bash
docker exec -i clickhouse-dev clickhouse-client << 'SQL'
CREATE TABLE IF NOT EXISTS persons (
id UInt32,
name String,
age UInt32
) ENGINE = MergeTree() ORDER BY id;

CREATE TABLE IF NOT EXISTS companies (
id UInt32,
name String
) ENGINE = MergeTree() ORDER BY id;

CREATE TABLE IF NOT EXISTS knows (
from_id UInt32,
to_id UInt32
) ENGINE = MergeTree() ORDER BY (from_id, to_id);

CREATE TABLE IF NOT EXISTS works_at (
person_id UInt32,
company_id UInt32
) ENGINE = MergeTree() ORDER BY (person_id, company_id);

INSERT INTO persons VALUES (1, 'Alice', 30), (2, 'Bob', 25);
INSERT INTO companies VALUES (1, 'Acme Corp');
INSERT INTO knows VALUES (1, 2);
INSERT INTO works_at VALUES (1, 1);
SQL
```

## 3. Start MemGQL

```bash
docker run --rm \
--name memgql \
--network memgql-net \
--stop-timeout 2 \
-p 7688:7688 \
--env CONNECTOR_TYPE=clickhouse \
--env CLICKHOUSE_URL=http://clickhouse-dev:8123 \
--env CLICKHOUSE_DB=default \
--env MAPPING_FILE=/data/mapping.json \
--env BOLT_LISTEN_ADDR=0.0.0.0:7688 \
-v ./mapping.json:/data/mapping.json \
memgraph/memgql:latest
```

## 4. Connect

```bash
mgconsole --port 7688
```

## 5. Query

```gql
MATCH (p:Person) RETURN p.name, p.age;
```

```gql
MATCH (p:Person)-[:WORKS_AT]->(c:Company) RETURN p.name, c.name;
```

```gql
MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name;
```

For environment variables, see [Configuration](../config.mdx#clickhouse-clickhouse).
1 change: 1 addition & 0 deletions pages/preview/memgql/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description: MemGQL Community and Enterprise feature comparison.
| [PostgreSQL](/preview/memgql/connect/postgres) | Yes | Yes |
| [DuckDB](/preview/memgql/connect/duckdb) | Yes | Yes |
| [Iceberg](/preview/memgql/connect/iceberg) | Yes | Yes |
| [ClickHouse](/preview/memgql/connect/clickhouse) | Yes | Yes |
| **Multi-Connection Mode** | Yes | Yes |
| Max connectors | 4 | Unlimited |
| Max simultaneous connections | 4 | Unlimited |