hydromodpy.results.catalog.parquet_views#

Parquet-backed DuckDB view helpers for per-simulation tabular outputs.

Five views map onto simulations/<basename>.parquet/<view>.parquet files: timeseries, budgets, mass_balance, metrics and provenance. Empty typed views are installed when no file exists yet, then swapped to a read_parquet view on the first write.

The column types are derived from the declared hydromodpy.results .parquet_schemas so SQL views and Parquet payloads share one source of truth.

Functions

ensure_parquet_views(conn, simulations_dir)

Create or refresh every Parquet-backed view on conn.

parquet_view_columns(view_name)

Return ((col, type), ...) for one Parquet view, derived from pyarrow.

view_name_for(view, existing_tables)

Pick a non-colliding DuckDB view name for a Parquet payload.