Generates PlantUML diagrams for clickhouse databases
Project description
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
python setup.py install
clickhouse-plantuml
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clickhouse_plantuml-0.2.3.tar.gz.
File metadata
- Download URL: clickhouse_plantuml-0.2.3.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43f26d2da5171feebaf8b20c714bc9419174ee3ac7a9de82204256f737bf76ce
|
|
| MD5 |
7eb69476c9bb3319e41d5fc69e3081be
|
|
| BLAKE2b-256 |
11fdb2ec1bb80c15a8ca6b4f0deea80edfc1f6cd0c3c01ff66dfcb71554d48eb
|
Provenance
The following attestation bundles were made for clickhouse_plantuml-0.2.3.tar.gz:
Publisher:
upload.yml on Felixoid/clickhouse-plantuml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clickhouse_plantuml-0.2.3.tar.gz -
Subject digest:
43f26d2da5171feebaf8b20c714bc9419174ee3ac7a9de82204256f737bf76ce - Sigstore transparency entry: 1704846310
- Sigstore integration time:
-
Permalink:
Felixoid/clickhouse-plantuml@ef85ce085e71d0e5ebbc7f19e2f53582246c93d5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Felixoid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yml@ef85ce085e71d0e5ebbc7f19e2f53582246c93d5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file clickhouse_plantuml-0.2.3-py3-none-any.whl.
File metadata
- Download URL: clickhouse_plantuml-0.2.3-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91cf4d30d277b9f7a40e4251253de29c6a9b8f40c0fc782054a87b83a1ec888
|
|
| MD5 |
a7e6647b5d0b2a1a15b1e5735cb49899
|
|
| BLAKE2b-256 |
532a5aa68723032f03bc677c1d60a02722e6c54397108aaf5030d5fafdff0bdb
|
Provenance
The following attestation bundles were made for clickhouse_plantuml-0.2.3-py3-none-any.whl:
Publisher:
upload.yml on Felixoid/clickhouse-plantuml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
clickhouse_plantuml-0.2.3-py3-none-any.whl -
Subject digest:
a91cf4d30d277b9f7a40e4251253de29c6a9b8f40c0fc782054a87b83a1ec888 - Sigstore transparency entry: 1704846319
- Sigstore integration time:
-
Permalink:
Felixoid/clickhouse-plantuml@ef85ce085e71d0e5ebbc7f19e2f53582246c93d5 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Felixoid
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload.yml@ef85ce085e71d0e5ebbc7f19e2f53582246c93d5 -
Trigger Event:
release
-
Statement type: