hydromodpy.results.parquet_io#

Atomic pyarrow Parquet writer with canonical V1 options forced.

Every Parquet file written by HydroModPy V1 goes through write_table_atomic(). It centralises:

  • ZSTD compression at level 5 (uniform across catalog and blob payloads),

  • row_group_size=50_000 so predicate pushdown on row-group stats kicks in,

  • write_page_index=True and use_dictionary=True for selective reads,

  • Parquet format version="2.6" (page index, column statistics v2),

  • a KV-metadata mixin layered on top of the schema metadata,

  • bloom filter columns (forwarded when the linked pyarrow build supports it).

The write goes to a sibling <target>.tmp-<uuid> then is promoted via os.replace, so the on-disk view is always either the prior file or the fully-written new one.

Module attributes

PARQUET_WRITE_DEFAULTS

Canonical write options applied by write_table_atomic().

Functions

read_kv_metadata(path)

Return the Parquet file metadata decoded as a plain str mapping.

write_table_atomic(table, target, *[, ...])

Write table to target atomically with the V1 Parquet options.