Repository navigation
Warehouse DuckDB
The
duckdbreader crawls the current database of a DuckDB connection with DuckDB's own table functions, and it is the engine every example and most tests in SchemaGuru use.Guru.connect("duckdb:///file.duckdb")works even without FactLang'sconnect(): the file is opened read-only through the DuckDB driver. Validated against the real engine in CI on every push.
Reader: duckdb (schemaguru.catalog.readers.duckdb.DuckDBReader). Extra:
pip install "schemaguru[duckdb]". The reader works in the connection's current database
(list_catalogs yields nothing), so refs carry no catalog: schema.table.
guru = sg.Guru.connect("duckdb:///warehouse.duckdb") # a file, opened read-only
guru = sg.Guru.connect("duckdb:///:memory:") # an in-memory databaseWhen FactLang's connect() is installed (FactLang 0.1.4+, the default) it opens the URL and its connector also
serves measurement. Without it, SchemaGuru's built-in fallback opens DuckDB itself: a file is
opened read-only (and a path that does not exist is an error, SG106, so a typo never
creates a database). You can also wrap an existing connection:
from schemaguru.catalog import DBAPIExecutor, reader_for
guru = sg.Guru(reader=reader_for("duckdb", DBAPIExecutor(conn)), dialect="duckdb")duckdb_schemas(), duckdb_tables(), duckdb_views(), duckdb_columns(),
duckdb_constraints(), filtered to current_database(). Schemas information_schema and
pg_catalog and temporary and internal objects are skipped.
None beyond opening the database; metadata queries are in-process and free.
Comments, a row estimate (estimated_size; views have none), column types, nullability and
defaults, and primary, unique and foreign keys (enforced=True: DuckDB enforces them).
bytes, last_altered and incremental listing are not available.
- A database file named like one of its schemas (
shop.duckdbholding schemashop) makesshop.ordersambiguous to DuckDB itself ("Ambiguous reference to catalog or schema"). Name the file differently (the examples usewarehouse.duckdb). - DuckDB lets a database file be opened either by one read-write process or by read-only ones,
so a loader cannot write to the file while a Guru holds it open. Close the Guru
(
guru.close(), or use it in awithblock) before loading new data.
- Catalog-and-Crawl
- Home (the three-line quickstart uses DuckDB)
- Contributing (the shop fixture is a DuckDB database)
- 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