Repository navigation
Warehouse Redshift
The
redshiftreader crawls databases and schemas from theSVV_ALL_*views, including Spectrum external schemas (catalog = database). Catalog queries run on the leader node and scan no table data; row counts and sizes come fromSVV_TABLE_INFO. Built from documented view shapes and tested against recorded fixtures; not yet validated against a live cluster.
Reader: redshift. Catalog = database, schema = schema. Extra: pip install "schemaguru[redshift]" (redshift-connector).
SVV_ALL_SCHEMAS, SVV_ALL_TABLES, SVV_ALL_COLUMNS (cross-database, includes datashares), SVV_TABLE_INFO (row estimate, size), SVV_EXTERNAL_TABLES / SVV_EXTERNAL_COLUMNS (Spectrum external schemas), and pg_constraint / pg_class / pg_attribute for constraints.
USAGE on the schemas and SELECT (or any privilege) on the tables to be described; SVV_* views show only visible objects. SVV_TABLE_INFO is visible only for tables the user can see (superusers see all); where a table is not listed, its row count and size are unknown. For external schemas, USAGE on the schema and access to the external catalog (Glue/Hive) through the associated IAM role.
Catalog queries run on the leader node and are free of scan charges; Serverless counts a few RPU-seconds each.
-
tbl_rows(fromSVV_TABLE_INFO) includes rows deleted but not yet vacuumed;sizeis in 1 MB blocks, sobytesis a multiple of 1 MiB. Row counts are joined only for the current database. - External tables are flagged
external; a table thatSVV_ALL_COLUMNSdoes not describe falls back toSVV_EXTERNAL_COLUMNS(types are the external type text, e.g.varchar(65535)). -
PRIMARY KEY,UNIQUEandFOREIGN KEYare informational and not enforced (enforced=False). Composite keys are read per column position withgenerate_seriesoverconkey(up to 32 columns), becauseunnest ... WITH ORDINALITYis unavailable on Redshift. This query is exercised by recorded fixtures only, not a live cluster, until a live run is contributed. - Live test:
SCHEMAGURU_LIVE_REDSHIFT=1withSCHEMAGURU_RS_{HOST,DATABASE,USER,PASSWORD,SCHEMA}. - No incremental listing: every crawl re-lists every table (still metadata only).
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