Repository navigation
Warehouse ClickHouse
The
clickhousereader crawls databases, tables and columns from ClickHouse'ssystem.*tables (a database is a schema). ClickHouse has no foreign keys and its primary key is a sort index, so no constraints are reported and none are inferred. Validated against a real ClickHouse server in CI (service container).
Dialect name: clickhouse (extra: pip install schemaguru[clickhouse], driver
clickhouse-connect).
system.databases, system.tables, system.columns. A database is a schema; refs carry no
catalog.
system.tables and system.columns list only objects the user can see. Grant SHOW TABLES /
SHOW COLUMNS (or SHOW DATABASES) on the databases to crawl. SELECT on data is not needed.
Metadata queries only. system.* reads are in-memory on the server. No data is scanned.
Comments, exact total_rows and total_bytes for MergeTree-family engines, the partition key
(partitioning), the sort key as clustering when it is a plain column list, metadata
modification time (last_altered, incremental listing supported).
-
No constraints. ClickHouse has no foreign keys and its
PRIMARY KEYis a sparse sort index, not a uniqueness guarantee, soconstraints()returns nothing. Never infer a key from it. -
Nullable(...)andLowCardinality(...)are unwrapped before the type family is chosen; a column is nullable only whenNullableis present.native_typekeeps the full declared text. -
total_rows/total_bytesareNULLfor views and some engines; they stay unknown. - A sort key that is an expression (for example
toDate(at)) is not a column list, soclusteringis unknown. -
ALIAS/MATERIALIZEDcolumns have no default value; onlyDEFAULTexpressions are reported. - The server does not support correlated subqueries, so the schema table count is computed with a join.
- Parameters are interpolated client-side by the driver (the DB-API
formatstyle); the reader still binds every value and builds no SQL from them.
- Catalog-and-Crawl
- Measurement (keys are measured, not assumed)
- Join-Graph
- Extending-CatalogReader
SchemaGuru is open source under the MIT License, Copyright (c) 2026 Rupak Chakraborty · Repository · Issues · This wiki is generated from docs/wiki/; edit it there, not here.
Start here
Components
- Catalog and Crawl
- Store
- Measurement
- Sampling
- Join Graph
- Path Search and Hub Guard
- Waypoint Rules
- Drafting
- PII and Sampling Policy
- Overlays
- Scoping
- Rendering
- Refresh and Drift
- Feedback and Guard
- Server
- Agent Integration
Using it
Warehouses
- BigQuery
- Snowflake
- Redshift
- Databricks
- PostgreSQL
- DuckDB
- ClickHouse
- SQL Server / Synapse
- Oracle
- Trino
- MySQL / MariaDB
Extending
- CatalogReader
- Store
- Retriever and Embedder
- TokenCounter
- LLMProvider
- PII Detector
- FailureClassifier
- FactKind
- Profile and Format
- ChangeClassifier
- JoinCandidateSource (planned)
- Authenticator
Project