DuckDB compatibility for exported datasets #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
For the eventual website and for power users, datasets should be queryable without loading the entire file into memory. Parquet files are natively queryable by DuckDB, which runs SQL directly on Parquet with zero configuration.
Scope
Make sure the Parquet files from Issue #18 are partitioned sensibly for large annotations, by
source_nameor CID range, for instance.Add a
query_dataset(path: Path, sql: str) -> pl.DataFramefunction using theduckdbPython package. Document example queries in the README or docs: "Get all pKa values for caffeine (CID 2519)," "Get high-confidence pKa values between 3.0 and 5.0," "Count data points per source."Add
duckdbas an optional dependency. The core package must work without it.Definition of done
query_datasetworks on exported Parquet files. Example queries documented. The core package works without DuckDB installed.