Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Document DuckDB schema metadata and table discovery (#11514)

Shahmir Varqha0a2a90423589
diff --git a/marimo/_sql/engines/duckdb.py b/marimo/_sql/engines/duckdb.py
index 49bdffd479..e2a8e58b24 100644
--- a/marimo/_sql/engines/duckdb.py
+++ b/marimo/_sql/engines/duckdb.py
@@ -38,6 +38,8 @@ INTERNAL_DUCKDB_ENGINE = cast(VariableName, "__marimo_duckdb")
@dataclass(frozen=True)
class _CatalogSchema:
+ """DuckDB schema metadata with an OID and ordered path within a database."""
+
database: str
oid: int
path: tuple[str, ...]
@@ -410,6 +412,7 @@ class DuckDBEngine(SQLConnection[Optional["duckdb.DuckDBPyConnection"]]):
include_table_details: bool,
schema_path: list[str] | None = None,
) -> list[DataTable]:
+ """List tables and views in a schema, optionally loading their columns."""
catalog_schema = self._find_schema(
database, tuple(schema_path or [schema])
)