Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for Clickhouse #1027

Merged
merged 1 commit into from Mar 5, 2023
Merged

Initial support for Clickhouse #1027

merged 1 commit into from Mar 5, 2023

Conversation

igor-suhorukov
Copy link
Contributor

Provide SchemaSpy doc generation support for ClickHouse database via clickhouse-jdbc

@igor-suhorukov
Copy link
Contributor Author

CREATE DATABASE taxiride;

CREATE TABLE uk_price_paid
(
    price UInt32 comment 'comment on price column',
    date Date,
    postcode1 LowCardinality(String),
    postcode2 LowCardinality(String),
    type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0),
    is_new UInt8,
    duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0),
    addr1 String,
    addr2 String,
    street LowCardinality(String),
    locality LowCardinality(String),
    town LowCardinality(String),
    district LowCardinality(String),
    county LowCardinality(String) comment 'Country name'
)
ENGINE = MergeTree
ORDER BY (postcode1, postcode2, addr1, addr2)
comment 'UK table comment';
$ java -jar target/schemaspy-6.1.1-SNAPSHOT.jar -dp ~/dev/tools/clickhouse-jdbc-0.4.1-all.jar -o target -u default -t clickhouse -host 127.0.0.1 -db taxiride -cat %
  ____       _                          ____
 / ___|  ___| |__   ___ _ __ ___   __ _/ ___| _ __  _   _
 \___ \ / __| '_ \ / _ \ '_ ` _ \ / _` \___ \| '_ \| | | |
  ___) | (__| | | |  __/ | | | | | (_| |___) | |_) | |_| |
 |____/ \___|_| |_|\___|_| |_| |_|\__,_|____/| .__/ \__, |
                                             |_|    |___/

                                              6.1.1-SNAPSHOT

SchemaSpy generates an HTML representation of a database schema's relationships.
SchemaSpy comes with ABSOLUTELY NO WARRANTY.
SchemaSpy is free software and can be redistributed under the conditions of LGPL version 3 or later.
http://www.gnu.org/licenses/

INFO  - Starting Main v6.1.1-SNAPSHOT on laptop with PID 47921 (/home/iam/dev/projects/oss_contrib/schemaspy/target/schemaspy-6.1.1-SNAPSHOT.jar started by iam in /home/iam/dev/projects/oss_contrib/schemaspy)
INFO  - The following profiles are active: default
INFO  - Started Main in 1.307 seconds (JVM running for 1.699)
INFO  - Starting schema analysis
INFO  - Connected to ClickHouse - 23.2.2.20
INFO  - Gathering schema details
Gathering schema details....(0sec)
Connecting relationships....(0sec)
Writing/graphing summary.INFO  - Gathered schema details in 0 seconds
INFO  - Writing/graphing summary
INFO  - Graphviz renderer set to ':cairo'
........(0sec)
Writing/diagramming detailsINFO  - Completed summary in 0 seconds
INFO  - Writing/diagramming details
.(0sec)
Wrote relationship details of 1 tables/views to directory 'target' in 0 seconds.
View the results by opening target/index.html
INFO  - Wrote table details in 0 seconds
INFO  - Wrote relationship details of 1 tables/views to directory 'target' in 0 seconds.
INFO  - View the results by opening target/index.html

image

@igor-suhorukov
Copy link
Contributor Author

image

@npetzall npetzall merged commit b940612 into schemaspy:master Mar 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants