diff --git a/docs/CATALOG.md b/docs/CATALOG.md index 0ee207c..465869c 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -155,6 +155,7 @@ hflow curate --sql-file query.sql \ Pass exactly one of the positional SQL string or `--sql-file`; passing both or neither is an error. +The curate() function accepts exactly one SELECT statement The manifest is written **manifest-last**: to a temp file, renamed into place only after the query completed, so a partial manifest is unreachable. diff --git a/tests/test_catalog_curation.py b/tests/test_catalog_curation.py index 69aa964..ecdae80 100644 --- a/tests/test_catalog_curation.py +++ b/tests/test_catalog_curation.py @@ -837,6 +837,21 @@ def test_constrained_connection_confines_sql_to_the_catalog(tmp_path: Path) -> N False, id="legitimate-single-select", ), + pytest.param( + "PIVOT episodes ON status USING count(*)", + True, + id="pivot", # DuckDB secretly expands this to CREATE then SELECT + ), + pytest.param( + "DESCRIBE SELECT episode_id FROM episodes", + False, + id="describe", + ), + pytest.param( + "SUMMARIZE SELECT episode_id FROM episodes", + False, + id="summarize", + ), ]