PlantUML generator for ClickHouse tables
This is a very early version of diagrams generator. It parses system.tables table and produces PlantUML diagrams source. Here's example of produced diagram:
@startuml
' This diagram is generated with https://github.com/Felixoid/clickhouse-plantuml
!define Table(x) class x << (T,mistyrose) >>
!define View(x) class x << (V,lightblue) >>
!define MaterializedView(x) class x << (m,orange) >>
!define Distributed(x) class x << (D,violet) >>
hide empty methods
hide stereotypes
skinparam classarrowcolor gray
Distributed(graphite.data) {
ENGINE=**Distributed**
..engine config..
cluster: graphite_data
database: graphite
table: data_lr
sharding_key: cityHash64(Path)
==columns==
Path: String
Value: Float64
Time: UInt32
Date: Date
Timestamp: UInt32
}
Table(graphite.data_lr) {
ENGINE=**ReplicatedGraphiteMergeTree**
..engine config..
rollup_config: graphite_rollup
..replication..
zoo_path: /clickhouse/tables/graphite.data_lr/{shard}
replica: {replica}
==columns==
Path: String <size:15><&signal></size>
Value: Float64
Time: UInt32 <size:15><&signal></size>
Date: Date <size:15><&list-rich></size>
Timestamp: UInt32
..<size:15><&list-rich></size>partition key..
toYYYYMMDD(toStartOfInterval(Date, toIntervalDay(3)))
..<size:15><&signal></size>sorting key..
Path, Time
}
Table(graphite.index) {
ENGINE=**ReplicatedReplacingMergeTree**
..engine config..
version: Version
..replication..
zoo_path: /clickhouse/tables/graphite.index/1
replica: {replica}
==columns==
Date: Date <size:15><&list-rich></size> <size:15><&signal></size>
Level: UInt32 <size:15><&signal></size>
Path: String <size:15><&signal></size>
Version: UInt32
..<size:15><&list-rich></size>partition key..
toYYYYMM(Date)
..<size:15><&signal></size>sorting key..
Level, Path, Date
}
Table(graphite.tagged) {
ENGINE=**ReplicatedReplacingMergeTree**
..engine config..
version: Version
..replication..
zoo_path: /clickhouse/tables/graphite.tagged/1
replica: {replica}
==columns==
Date: Date <size:15><&list-rich></size> <size:15><&signal></size>
Tag1: String <size:15><&signal></size>
Path: String <size:15><&signal></size>
Tags: Array(String)
Version: UInt32
..<size:15><&list-rich></size>partition key..
toYYYYMM(Date)
..<size:15><&signal></size>sorting key..
Tag1, Path, Date
}
graphite.data_lr -|> graphite.data
@enduml
And how it looks after running PlantUML:
Usage
pip install clickhouse-plantuml
clickhouse-plantuml
Metadata
Release files for clickhouse-plantuml 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clickhouse_plantuml-0.3.0.tar.gz | 17.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clickhouse_plantuml-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.8 kB
Release files / clickhouse_plantuml-0.3.0.tar.gz
| Download URL | clickhouse_plantuml-0.3.0.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e25ab319e85c282e6b26be0c74ef4190c0fe0cb37b225899261d962406d07dc2
|
|
BLAKE2b-256 checksum How to use checksums |
038a1abb58415c7d621edd75fe86c071f069dd5e1ab55990cace3dd9bd54a51a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.
Transparency logRelease files / clickhouse_plantuml-0.3.0-py3-none-any.whl
| Download URL | clickhouse_plantuml-0.3.0-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f078e2df861ebd97fd7db7d0fa406977634829006b15690ab45a014159eeb6a9
|
|
BLAKE2b-256 checksum How to use checksums |
544da5ce5b6d299156e238d1bd55c8d433a804ad8d01329ead45cc6bb652496e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.
Transparency log