Repository navigation
Warehouse TSQL
The
tsqlreader crawls the connection's database from thesys.*catalog views, with comments from theMS_Descriptionextended property. Row counts come fromsys.partitionswithout scanning data; Synapse'sNOT ENFORCEDkeys are reported as not enforced. Validated against a real SQL Server 2022 in CI (service container).
Dialect name: tsql (extra: pip install schemaguru[mssql], driver pyodbc; install the
Microsoft ODBC Driver 18 for SQL Server).
sys.schemas, sys.objects (types U and V), sys.partitions, sys.columns, sys.types,
sys.default_constraints, sys.key_constraints, sys.index_columns, sys.foreign_keys,
sys.foreign_key_columns, sys.extended_properties. The connection's database is the scope;
refs carry no catalog.
sys.* shows only objects the login has some permission on, so grant VIEW DEFINITION on the
schemas to crawl (or membership in db_datareader, which implies visibility). Nothing is written.
Metadata queries only; no table data is read. Row counts come from sys.partitions (no scan).
Comments from the MS_Description extended property (tables, columns, schemas), exact row
counts for tables, defaults, primary keys, unique constraints and foreign keys.
-
sys.objects.create_date/modify_dateare server-local with no zone, socreated_atandlast_alteredare left unknown instead of guessed; incremental listing is not offered. - Sizes are not reported (
bytesunknown):sys.allocation_unitsis absent on Synapse. - Synapse dedicated pools declare primary and unique keys
NOT ENFORCED; the reader detects the engine throughSERVERPROPERTY('EngineEdition')and reportsenforced=False. - A disabled foreign key is reported
enforced=False. - View column nullability is reported as unknown.
- Type text is rebuilt from
sys.typesandsys.columns(nvarchar(255),decimal(10,2),datetime2(3)); alias types keep their own name but take the family of their base type. - Names are ordered and paged with a binary collation, so case-insensitive databases page correctly.
- A column or table name is returned exactly as stored; use
[ ]quoting in SQL, the SchemaGuru canonical form uses double quotes.
- Catalog-and-Crawl
-
Feedback-and-Guard (why
[...]in agent SQL can be refused) - Concepts
- 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